Review model selection, validation and uncertainty
Run xpd modeling <paths> before trusting a reported model score. It discovers models, evaluation reports, and CV wrappers across scikit-learn, glum, interpret (ExplainableBoostingClassifier/Regressor, APLR*), optbinning (Scorecard), quantile_forest, skore, model_diagnostics, scikit-lego, MAPIE, venn_abers, pymc (pm.Model, pymc.gp.HSGP, nutpie), LightGBM, XGBoost, Optuna, optuna_integration, skfolio, skrub, Nixtla (MLForecast, StatsForecast), statsmodels, and linearmodels, checks post-fit explanation code across shap, fippy, effector, interpret, and model_diagnostics, measures paired development folds against baselines and candidate families (including per-fold Kish ESS weight_diagnostics), and enforces every selection, grouping, metric, uncertainty, and explanation decision in a gated ledger.
What xpd modeling checks
Section titled “What xpd modeling checks”| Group | Finding kinds |
|---|---|
| Model design, grouping and tuning | unscaled-model, grouped-predictor, cv-optimization, model-configuration |
| Validation and selection | split-mismatch, test-set-tuning, validation-leakage, validation-reproducibility, boosting-validation |
| Comparisons and metrics | baseline-not-observed, metric-loss-mismatch, metric-response, model-explanation |
| Calibration and uncertainty | conformal-leakage, conformal-configuration |
Inspect the checklist questions in the catalog:
$ xpd modeling --questions --format json | jq -c '[.questions[].id]'["model-family","grouped-predictors","validation-scheme","cv-optimization","baseline-comparison","metric-and-loss","feature-exclusions","probability-calibration","uncertainty-and-conformal","first-failure","model-explanation","pipeline-evidence"]Run a recorded review
Section titled “Run a recorded review”- Decide which rows represent the deployment population, which inputs are available at prediction time, and which errors cost more. Run
xpd modeling <paths> --limit 0 --format jsonto read named models, findings, and checklist IDs. - Write a fold adapter with the real splitter (
TimeSeriesSplit,TimeGapSplit,WalkForward,CombinatorialPurgedCV,GroupKFold), primary scorer (string or custom asymmetric callable), optionalsecondary_scorers, naive baseline, optional multi-familycandidates, group/time metadata, and optional MAPIE conformalizer (conformalizefor split conformal orconformalize_fitfor cross-conformal / jackknife+ / EnbPI / ACI / classification sets). Keep the final test holdout outside the adapter. - Commit the model code and adapter, then run
xpd modeling start <paths> --adapter adapter.py --check "git diff --check"andxpd modeling <paths> --adapter adapter.py --format json. Inspectestimator_profile, paired baseline and candidate deltas, residual bias, heteroscedasticity, target extrapolation share, per-group performance, reliability bins (Brier, log-loss, ECE), and conformal coverage (MWI and SSC). - Record fixes, accepted findings, and checklist verdicts with
xpd modeling plan plan.json. Core decisions (model-family,validation-scheme,baseline-comparison,metric-and-loss,first-failure) cannot be waived withna,grouped-predictorscannot usenawhen two or more groups are measured, anduncertainty-and-conformalrequires either measured conformal/probabilistic coverage or an explicit point-only justification. - Approve interface changes with
xpd modeling approve <fix>, commit one fix, and runxpd modeling gate <fix>. Resume withxpd modeling status, settle any invalidated answers withxpd modeling plan -, and close withxpd modeling finish.
Related proofs
Section titled “Related proofs”Use xpd data-prep for raw hygiene, xpd time-series for series structure, xpd feature-engineering for features, separate feature/target transforms, grouped transforms, and sample weights, xpd api xpd/recipe/modeling for the full runnable model-selection recipe, and xpd api xpd/recipe/model-explanation for TreeSHAP (shap), held-out LOCO/CFI/SAGE (fippy), and ALE/RHALE region curves (effector). For a compatible saved pipeline, cite xpd check, xpd equiv, and MCP discovery_gate verdicts at the reviewed commit under pipeline-evidence.
See the command reference for the full adapter contract, recorded walkthrough, and exit codes.