skill for supervised ML on small datasets
SaferSkills independently audited small-sample-analysis (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A complete methodology for building defensible predictive models on small datasets (typically n < 200, often n < 50).
Small-sample analysis differs fundamentally from standard ML workflows. The defaults that work on 100k+ rows actively harm models on small data:
This skill captures a methodology that handles these pitfalls explicitly.
Triggers:
Match the user's natural language for all deliverables (Notebook markdown, Word body, chart labels, slides). Code, math notation, and standard ML abbreviations (Ridge, SHAP, R², MAPE) stay in English regardless. For non-Latin scripts, set CJK-capable fonts in matplotlib (Noto Sans CJK JP) and docx (Microsoft YaHei) to prevent □□□ rendering bugs.
Drill these into every analysis:
This is the canonical end-to-end pipeline. Don't skip steps — each catches failures the next assumes are absent.
First thing in any small-sample project: state the n explicitly, derive the feature budget (n/5 is the OLS rule, slightly relaxed under regularization), and discuss constraints with the user. If they're surprised by the constraint, the rest of the analysis is at risk.
Always run hard consistency validations (e.g. sub-totals should sum to total to 1e-12 precision). Document failures, never silently fill.
Don't just plot distributions. Ask:
Apply n/5 budget. If unsure, see references/feature_engineering.md. Use dual-scheme designs (static-only vs static+early-operational) when the business has multiple decision time points.
Don't just say "we used Ridge". Document why each alternative was rejected (XGBoost overfits, OLS unstable under collinearity, Lasso over-shrinks). See references/model_selection.md.
Always report relative to the "predict the mean" baseline. R² alone is meaningless; "12% RMSE reduction over baseline" is meaningful.
Never report single train/test. Use OOF predictions for all metrics. For n < 50, consider LOOCV as additional validation.
Standard 4-panel: residual vs predicted, residual vs actual (the regression-to-mean detector), histogram, Q-Q plot. See references/residual_diagnosis.md for interpretation patterns. Honest exposure of model flaws beats hiding them.
Confirm key business findings using 2+ independent methods. Examples:
When residuals show systematic issues:
references/iteration_workflow.md)references/overfit_validation.md for the 5-method overfitting check.Small-sample projects often serve stakeholders who need to understand the reasoning. Produce:
See references/deliverable_templates.md for layouts and the canonical 14-chapter structure.
When working through the steps, consult the appropriate reference:
references/model_selection.md — Choosing between Ridge / RF / GBM / decision trees, with rejection logic for XGBoost/Lasso/NNreferences/feature_engineering.md — Top-K selection, dual-scheme designs, segment dummies, derived ratiosreferences/residual_diagnosis.md — 4-quadrant interpretation, regression-to-mean detection, slope analysisreferences/iteration_workflow.md — How to set up A/B/C/D variant comparisons, threshold sources (data-driven vs business-driven)references/overfit_validation.md — The 5-method overfitting check (train/CV gap, LOOCV, permutation test, learning curves, α sensitivity)references/cross_validation_methods.md — Triangulating findings across decision trees, SHAP, clusteringreferences/deliverable_templates.md — Canonical 14-chapter structure, Notebook/Word/PPT layouts, math expression formattingRead the file when you reach that step. Don't load them all upfront.
When you see the user heading toward these, intervene:
When writing the final deliverables, proactively disclose:
Suppressing these gets the model rejected in real audit / peer review. Including them builds credibility.
| Decision point | Default answer | When to deviate | ||
|---|---|---|---|---|
| Algorithm | Ridge regression, α=30 | If n > 500, can try gradient boosting | ||
| Feature count | Top-10 by \ | r\ | Reduce if n < 30 | |
| CV scheme | 5-fold | Use LOOCV if n < 30 | ||
| Baseline | Predict the mean | Use prior model if iterating | ||
| α grid | {0.1, 1, 5, 10, 30, 100, 300} | Narrow once you know roughly | ||
| Significance threshold | p < 0.05 strict, p < 0.10 marginal | Lower at very small n | ||
| Overfitting check | Train/CV gap, LOOCV, permutation, learning curve, α sensitivity | All 5 if final model is being claimed |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.