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.
npx skills add param087/agent-ml-skills --skill hyperparameter-tuninggit clone --depth 1 https://github.com/param087/agent-ml-skillsWrote 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.
[](https://agentmods.dev/skills/param087/agent-ml-skills/hyperparameter-tuning)<a href="https://agentmods.dev/skills/param087/agent-ml-skills/hyperparameter-tuning"><img src="https://agentmods.dev/badge/skills/param087/agent-ml-skills/hyperparameter-tuning/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.
<a href="https://agentmods.dev/skills/param087/agent-ml-skills/hyperparameter-tuning"><img src="https://agentmods.dev/badge/skills/param087/agent-ml-skills/hyperparameter-tuning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00040 | $0.00741 |
| Opus 5.5 | $0.00016 | $0.00296 |
| Sonnet 5.5 | $0.00008 | $0.00148 |
| Haiku 4.5 | $0.00004 | $0.00074 |
Grade A, and why
hyperparameter-tuning 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Hyperparameter Tuning
Overview
Tuning squeezes the last 5-15% out of a model — but done carelessly it overfits the validation set and leaks preprocessing. The rules: tune the whole pipeline inside cross-validation, search smart (not grid), and keep a final untouched test set.
When to use
- A reasonable baseline exists and you want to improve it.
- You need to pick model complexity (depth, regularization, lr).
Strategy selection
| Situation | Method |
|---|---|
| Few params, cheap model | GridSearchCV |
| Many params / continuous | RandomizedSearchCV (often beats grid per compute) |
| Expensive model, want efficiency | Bayesian / Optuna (TPE) |
| Neural nets | Optuna + early stopping + pruning |
Optuna pattern (leakage-safe, prunes bad trials)
import optuna
from sklearn.model_selection import cross_val_score, StratifiedKFold
cv = StratifiedKFold(5, shuffle=True, random_state=42)
def objective(trial):
params = {
"clf__learning_rate": trial.suggest_float("lr", 1e-3, 0.3, log=True),
"clf__max_depth": trial.suggest_int("max_depth", 3, 12),
"clf__l2_regularization": trial.suggest_float("l2", 1e-3, 10, log=True),
}
model.set_params(**params)
scores = cross_val_score(model, X_train, y_train, cv=cv, scoring="roc_auc")
return scores.mean()
study = optuna.create_study(direction="maximize",
sampler=optuna.samplers.TPESampler(seed=42))
study.optimize(objective, n_trials=50, timeout=1800)
print(study.best_params, study.best_value)
Note the clf__ prefix — you're tuning the estimator inside the pipeline, so preprocessing re-fits per fold.
Search-space design
- Sample learning rates and regularization on a log scale.
- Start wide, then narrow around the best region in a second study.
- Tie
n_estimatorsto early stopping rather than tuning it directly. - Fix the seed in the sampler for reproducible studies.
Budget management
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.
- 2mo ago First seen · 75 lines · 40 tokens per session scan A 11ec88b53c0b
hyperparameter-tuning is a skill published in the GitHub repository param087/agent-ml-skills (13 stars, last pushed 5mo ago), licensed MIT. It adds 40 tokens to every session and 741 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-08-31.
hyperparameter-tuning compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| hyperparameter-tuningparam087/agent-ml-skills | Skill | 13 | 5mo ago | MIT | A | 40 | Claude Code, Codex |
| spark-training-gotchaswshobson/agents | Skill | 42k | yesterday | MIT | A | 63 | Claude Code |
| 9router-sttdecolua/9router | Skill | 32k | 9d ago | MIT | A | 63 | Claude Code, Codex |
| 9routerdecolua/9router | Skill | 32k | 9d ago | MIT | A | 84 | Claude Code, Codex |
| 9router-embeddingsdecolua/9router | Skill | 32k | 9d ago | MIT | A | 66 | Claude Code, Codex |
| dashscopecalesthio/OpenMontage | Skill | 77k | 3d ago | AGPL-3.0 | A | 93 | Claude Code, Codex |
| ultralytics-platformfcakyon/claude-codex-settings | Skill | 1.2k | yesterday | Apache-2.0 | A | 135 | Claude Code |