model-training-and-evaluation

model-training-and-evaluation is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 45 tokens per session (1,817 once invoked), scanned A, original, Apache-2.0.

A guide to training and evaluating machine-learning models, including how to split data, compare with a baseline, tune settings, choose thresholds, and inspect errors. Cross-validation means repeatedly training and checking on different parts of the data to estimate performance.

In plain words
What is it for?
Use it when training, comparing, tuning, or reviewing a model. It helps choose validation schemes, report uncertainty, examine performance across groups, assess calibration, and investigate wrong predictions.
Why use it?
A model score can be misleading if the data split does not match real use, tuning leaks into the final test, or there is no simple comparison. The guide connects each reported number to a measurement method and a reference point.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when training, comparing, tuning, or reviewing a model. It helps choose validation schemes, report uncertainty, examine performance across groups, assess calibration, and investigate wrong predictions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makifbaysal/tasktrooper/model-training-and-evaluation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add makifbaysal/tasktrooper --skill model-training-and-evaluation
Clone the repo
git clone --depth 1 https://github.com/makifbaysal/tasktrooper

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for model-training-and-evaluation

README.md
[![agentmods](https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/model-training-and-evaluation/github.svg)](https://agentmods.dev/skills/makifbaysal/tasktrooper/model-training-and-evaluation)
Your own site
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/model-training-and-evaluation"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/model-training-and-evaluation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for model-training-and-evaluation

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/model-training-and-evaluation"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/model-training-and-evaluation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,817 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.01817
Opus 5.5 $0.00018 $0.00727
Sonnet 5.5 $0.00009 $0.00363
Haiku 4.5 $0.00005 $0.00182

Measured 4d ago against content hash 11c43bdded07, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

model-training-and-evaluation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

catalog/agents/data-scientist/skills/model-training-and-evaluation/SKILL.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Model Training and Evaluation

Overview

A model's score is an estimate, and its quality depends on how it was estimated: the split that matches the data's structure, the baseline it is compared with, the tuning kept away from the final test, and the spread around the number. Gradient-boosted trees on tabular data are the strong default; anything more complex has to beat them on the same folds.

Core principle: every number you report answers "compared with what, measured how, and how sure" — baseline, CV scheme, spread.

1. Pick the CV scheme from the data

Data Splitter
Independent rows, classification StratifiedKFold(n_splits=5, shuffle=True, random_state=seed)
Independent rows, regression KFold(n_splits=5, shuffle=True, random_state=seed)
Repeated entities (users, patients, stores) GroupKFold / StratifiedGroupKFold with groups=
Time-ordered, forecasting or scoring the future TimeSeriesSplit(n_splits=5, gap=horizon) or a rolling-origin split by date
Small data (< a few thousand rows) RepeatedStratifiedKFold for a stabler mean and spread

The scheme mirrors production: a model that scores next month is validated on a later month than it trained on. Leakage rules apply throughout (leakage-safe-feature-engineering).

2. Baselines on the same folds

scoring = "average_precision"
baseline = cross_validate(DummyClassifier(strategy="prior"), X_train, y_train, cv=cv, scoring=scoring)
linear = cross_validate(make_linear(seed), X_train, y_train, cv=cv, scoring=scoring)
gbm = cross_validate(make_gbm(seed), X_train, y_train, cv=cv, scoring=scoring)

Always include the dummy and the simple rule from ml-problem-framing. A complex model that beats the linear one by less than the fold-to-fold spread is not better.

3. Tune inside cross-validation

Hyperparameter search runs on the training data with the same CV; the test set is not involved (rule test-set-discipline).

def objective(trial: optuna.Trial) -> float:
    params = {
        "learning_rate": trial.suggest_float("learning_rate", 1e-3, 0.3, log=True),
        "max_leaf_nodes": trial.suggest_int("max_leaf_nodes", 15, 255, log=True),
        "l2_regularization": trial.suggest_float("l2_regularization", 1e-8, 10.0, log=True),
    }
    return cross_val_score(make_gbm(seed, **params), X_train, y_train, cv=cv, scoring=scoring).mean()

study = optuna.create_study(direction="maximize", sampler=optuna.samplers.TPESampler(seed=seed))
study.optimize(objective, n_trials=50)

Read the full file on GitHub · 139 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 139 lines · 45 tokens per session scan A 11c43bdded07

Subscribe to this mod's changes

model-training-and-evaluation is a skill published in the GitHub repository makifbaysal/tasktrooper (113 stars, last pushed yesterday), licensed Apache-2.0. It adds 45 tokens to every session and 1,817 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-09.