executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
radiomics-mlUse when building or auditing a radiomics or tabular clinical-ML prediction model with a classical learner (LASSO, SVM, random forest, XGBoost and similar). Enforces nested CV, dimensionality control, in-fold feature selection, feature stability, calibration and external validation.
Independent GitHub snapshot · Automated classification · Original documentation governs
Radiomics + tree-ensemble studies (features → random forest / XGBoost → a clinical outcome) are the most common solo-doable clinical-ML workflow — no GPU, no engineer — and the most commonly over-optimistic: hundreds-to-thousands of features on tens of patients, hyperparameters tuned on the same folds the performance is reported from, features selected on the whole dataset, unstable features never filtered, and discrimination (AUC) reported without calibration. This skill produces the pipeline correctly and audits an existing one, so the clinical result survives review (Lambin 2017; CLEAR; TRIPOD+AI; PROBAST-AI).
It sits beside the imaging-DL lane: where /model-scaffold builds a deep network, radiomics-ml
covers the feature-based classical-ML path. It integrates scikit-learn / xgboost / pyradiomics
(referenced in the emitted code); it does not reimplement them and never runs a model on real patient
data.
/model-selection → /model-scaffold → /model-assessment./analyze-stats./model-assessment.dimensionality_reduction does not clear it: n_features already counts what is
left after outcome-blind reduction. The gate's p ≥ events rule (events = the minority class) is a floor that catches the worst case,
not a sample-size criterion: size the study with /calc-sample-size Test 12 (Riley criteria,
pmsampsize), counting every candidate feature that reaches outcome-driven selection or
fitting. At C = 0.75 and 35% prevalence that is about 48 patients per candidate parameter: 100
candidates need N = 4,755 (1,665 events), and the gate passes 100 features on 105 events. Reduce
candidates without the outcome first (stability, redundancy, clinical prior); LASSO or other
penalisation does not substitute for sample size, because the shrinkage it estimates is itself
unstable at small n (Riley et al., J Clin Epidemiol 2021; Van Calster et al., Stat Methods Med
Res 2020).Not in the gate, because the manifest cannot show it: rows of one patient on both sides of a split. Lesion-level tables with row-wise folds let the model recognise the patient; on null synthetic data this took nested-CV AUROC from 0.48 to 0.99. Split by patient and check the fold table (Phase 2).
For radiomics, extract with pyradiomics under reproducible, IBSI-aligned settings (fixed bin width,
resampling, normalisation) — record them. For clinical/tabular data, assemble the feature table with a
patient/subject ID and the outcome. One row per lesion or ROI is fine; the ID is what the folds are
split by. See references/radiomics_ml_guide.md.
StratifiedGroupKFold(groups=patient_id) so one patient's
lesions never straddle folds, write the fold table (patient_id,split), and prove it with
/model-assessment's check_split_leakage.py --splits cv_folds.csv --seed <seed> --strict
(skeleton in the guide §4)./calc-sample-size Test 12 (pmsampsize). LASSO selects inside the fold but does not
make a small sample large enough; report the shortfall as a limitation if N falls below the Riley
minimum.docs/method_coverage_map.md./analyze-stats calibration guide) and clinical utility (decision curve). SHAP for interpretation.{
"task": "classification",
"n_features": 40, "n_samples": 300, "n_events": 110,
"cv_scheme": "nested",
"feature_selection_stage": "inside_cv",
"dimensionality_reduction": true,
"feature_stability": "icc",
"calibration_reported": true,
"external_validation": "temporal",
"model": "xgboost"
}
n_features — the candidate features that reach outcome-driven selection or fitting, after
outcome-blind reduction (here 1,200 extracted → ICC ≥ 0.75 → |r| < 0.9 → 40). This example passes
the gate, yet pmsampsize (C = 0.75, prevalence 110/300) asks for N = 1,868 with 685 events for
40 candidate parameters: the gate does not size the study, Test 12 does. n_features,
n_samples and n_events must be non-negative integers (n_events ≤ n_samples); anything else
is an input error (exit 2). dimensionality_reduction is informational and clears nothing.feature_selection_stage — inside_cv, outside_cv, or none (no outcome-driven selection).
Missing or unrecognised is treated as not shown to be in-fold (SELECTION_OUTSIDE_CV).feature_stability — icc / test_retest; external_validation — external / temporal /
geographic. Any other value (e.g. planned, internal, bootstrap, random_split) is flagged.
Values are case-insensitive; - and spaces read as _.cv_scheme — nested, or held_out_test / single_split when hyperparameters and model choice
were tuned on the training split only and the test split was touched once. A split that was also
used for tuning, model selection or a threshold is flat (choosing among 12 candidate models on
the test split of null data reported AUROC 0.63 instead of 0.51). At radiomics sample sizes a
single random split wastes data and is unstable; prefer (repeated) nested CV (Steyerberg,
J Clin Epidemiol 2018).python3 scripts/check_radiomics_ml.py --manifest pipeline_manifest.json --strict
Verdicts: NO_NESTED_CV, HIGH_DIM_LOW_EVENTS, SELECTION_OUTSIDE_CV (Major);
NO_FEATURE_STABILITY, NO_CALIBRATION, NO_EXTERNAL_VALIDATION, and HIGH_DIM_NOT_ASSESSED
when n_features, n_samples or n_events is missing (Minor). Complements
self-review's check_cv_leakage (which audits a finished manuscript's prose) at the pipeline-spec
level.
/analyze-stats — calibration + clinical-utility (decision curve, NNT) guides for the reporting./check-reporting — CLEAR (radiomics), TRIPOD+AI, PROBAST-AI item coverage./self-review clinical_prediction_model probe audits the finished manuscript; this skill
produces the rigorous pipeline it looks for.NO_NESTED_CV).check_radiomics_ml.py. The rigor
verdict is reproduced deterministically, never asserted from prose.scripts/check_radiomics_ml_challenge/ ships a synthetic weak/strong pipeline pair with a network-free
verify.sh wired into the skill's validation commands.