model-evaluation
Skill11 starsChanged 6 months agoMITView on GitHub
Use when choosing metrics, validating models, or interpreting results. Covers metric selection by problem type, cross-validation strategy, calibration, confusion-matrix analysis, and avoiding misleading scores.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- cellrishi-code/claude-skills-atlastheir own version, first seen Oct 4, 2026
- scoobydont-666/shared-claude-skillstheir own version, first seen Jul 7, 2026
- mbburabak/mlforgetheir own version, first seen Jun 11, 2026
- GoogleCloudPlatform/cloud-solutionstheir own version, first seen May 29, 2026
- kienbui1995/magic-powerstheir own version, first seen Apr 10, 2026
- awslabs/agent-pluginstheir own version, first seen Feb 25, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- awslabs/agent-plugins★ 910same name
- GoogleCloudPlatform/cloud-solutions★ 135same name
- cellrishi-code/claude-skills-atlas★ 4same name
- scoobydont-666/shared-claude-skills★ 1same name
- kienbui1995/magic-powers★ 0same name
- mbburabak/mlforge★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- data-cleaningSkill
- experiment-trackingSkill
- exploratory-data-analysisSkill
- feature-engineeringSkill
- hyperparameter-tuningSkill
- imbalanced-dataSkill
- llm-finetuningSkill
- ml-debuggingSkill
- model-servingSkill
- pandas-patternsSkill
- pytorch-training-loopSkill
- rag-pipelineSkill
- reproducible-mlSkill
- sklearn-pipelinesSkill
The file
Files
Model Evaluation
Overview
The wrong metric on the wrong split produces confident, wrong conclusions. Evaluation is about choosing a metric that matches the business cost, validating it on a split that mirrors production, and reporting it honestly with uncertainty.
When to use
- Selecting how to score a model.
- A model "looks great" but you're unsure it's real.
- Comparing candidate models for promotion.
Metric selection
| Problem | Default metric | Use when |
| Balanced classification | ROC-AUC, accuracy | classes ~balanced |
| Imbalanced classification | PR-AUC, F1, recall@k | rare positives (fraud, disease) |
| Probabilistic output | Log loss, Brier, calibration | you need trustworthy probabilities |
| Ranking | NDCG, MAP, MRR | recommendation/search |
| Regression | MAE (robust), RMSE (penalize big errors) | match error cost |
| Regression, multiplicative | MAPE / RMSLE | errors scale with magnitude |
Cross-validation strategy
- Default:
StratifiedKFoldfor classification. - Time series:
TimeSeriesSplit— never shuffle; train on past, validate on future. - Grouped data (multiple rows per user):
GroupKFoldso the same group never spans train and test. - Small data: repeated CV; report mean ± std.
Honest reporting
from sklearn.model_selection import cross_val_score, StratifiedKFold
import numpy as np
cv = StratifiedKFold(5, shuffle=True, random_state=42)
scores = cross_val_score(model, X, y, cv=cv, scoring="average_precision")
print(f"PR-AUC: {scores.mean():.3f} ± {scores.std():.3f}") # always report spreadBeyond a single number
- Confusion matrix / classification report at the chosen threshold — accuracy hides per-class failure.
- Threshold tuning — default 0.5 is rarely optimal; pick it from the PR curve to match precision/recall needs.
- Calibration —
CalibratedClassifierCVor reliability curves when probabilities feed decisions. - Slice metrics — evaluate on subgroups to catch fairness/robustness gaps.
Pitfalls
- Accuracy on imbalanced data — 99% accuracy by predicting the majority class. Use PR-AUC/recall.
- Tuning the threshold on the test set — do it on validation.
- Shuffling time-series CV — leaks the future, inflates scores, collapses in production.
- Reporting a point estimate with no variance — a 0.2% gain inside ±1.5% noise is not a gain.
- Evaluating on the data you tuned on — keep a final untouched test set.
Hand-off
A defensible metric + validated score with uncertainty, plus a chosen decision threshold, for experiment-tracking to log and stakeholders to trust.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

