The model_diagnostics pack checks model-diagnostics 1.5.1 scoring decompositions, Murphy diagrams, auto-calibration and conditional-bias diagnostics, marginal plots, and permutation importance on files that import model_diagnostics.
| Rules |
Safe fix |
Unsafe fix |
Manual fix |
| 5 |
0 |
2 |
3 |
| Rule |
Severity |
Fix |
What it finds |
| weights-keyword-argument |
error |
unsafe |
model_diagnostics uses weights= instead of scikit-learn's sample_weight= and rng= instead of random_state=. |
| decompose-custom-missing-functional |
error |
none |
model_diagnostics.scoring.decompose() inspects scoring_function.functional when functional=None. |
| invalid-functional-or-level |
error |
none |
model_diagnostics validates functional against ("mean", "median", "expectile", "quantile") and requires 0 < level < 1 for quantile and expectile functionals and score objects (PinballLoss, HomogeneousQuantileScore, HomogeneousExpectileScore, ElementaryScore). |
| diagnostics-on-training-rows |
warning |
none |
Running score decomposition, Murphy diagrams, reliability diagrams, bias diagnostics, marginal plots, or permutation importance on training rows (y_train / X_train) measures in-sample overfit rather than held-out calibration and generalization. |
| unseeded-stochastic-diagnostics |
warning |
unsafe |
compute_permutation_importance, plot_permutation_importance, compute_partial_dependence, compute_marginal, and plot_marginal subsample rows (via n_max) or permute feature columns randomly using rng=None by default, causing diagnostic tables and plots to drift between runs. |