Skip to content

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.

Model, tuning & explanationcodeCheck scaling, splitters, CVsearch, scoring, glum,interpret, optbinning,quantile_forest, skore,shap, fippy, effector,Optuna, MAPIE,venn_abers & PyMC rulesDevelopment fold --adapterMeasure candidates,estimator profile, residuals,groups, calibration &conformal/quantilecoverageFinding ledger andper-model checkliststart -> plan -> gate ->finish
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:

Terminal window
$ 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"]
  1. 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 json to read named models, findings, and checklist IDs.
  2. Write a fold adapter with the real splitter (TimeSeriesSplit, TimeGapSplit, WalkForward, CombinatorialPurgedCV, GroupKFold), primary scorer (string or custom asymmetric callable), optional secondary_scorers, naive baseline, optional multi-family candidates, group/time metadata, and optional MAPIE conformalizer (conformalize for split conformal or conformalize_fit for cross-conformal / jackknife+ / EnbPI / ACI / classification sets). Keep the final test holdout outside the adapter.
  3. Commit the model code and adapter, then run xpd modeling start <paths> --adapter adapter.py --check "git diff --check" and xpd modeling <paths> --adapter adapter.py --format json. Inspect estimator_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).
  4. 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 with na, grouped-predictors cannot use na when two or more groups are measured, and uncertainty-and-conformal requires either measured conformal/probabilistic coverage or an explicit point-only justification.
  5. Approve interface changes with xpd modeling approve <fix>, commit one fix, and run xpd modeling gate <fix>. Resume with xpd modeling status, settle any invalidated answers with xpd modeling plan -, and close with xpd modeling finish.

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.