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 agentmods add skills/param087/agent-ml-skills/hyperparameter-tuningnpx 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.svg" alt="Measured on agentmods" 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 | $0.00040 | $0.00741 |
| Opus 5 | $0.00020 | $0.00370 |
| Sonnet 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 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.
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.
- 4d 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 (9 stars, last pushed 3mo ago), licensed MIT. It adds 40 tokens to every session and 741 once invoked, about $0.0002 per session on Opus 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.
Other skills, from other repositories
stock-data-fetch
Fetch multi-market financial data — US (FMP→Finnhub), A/HK (Tencent→Sina), crypto (OKX→Hyperliquid), commodities (Hyperliquid+Finnhub), news (Marketaux), backup (Longbridge). Battle-tested in restricted network environments.
data-scientist
数据分析全流程:数据画像、统计检验、可视化、报告生成。三阶段流程(数据摄入→分析执行→报告生成),单 agent 完成,无需多 agent 编排。当用户提到 CSV/Excel/Parquet 数据分析、假设检验、统计报告、制造业分析(良率/SPC/Cpk)、A/B 测试、或数据质量问题诊断时使用。.
auth-web-cloudbase
CloudBase Web Authentication Quick Guide for frontend integration after auth-tool has already been checked. Provides concise and practical Web authentication solutions with multiple login methods and complete user management.
browse-and-evaluate
Use when exploring the ai-agent-skills catalog to find, compare, and evaluate skills before installing. Always use --fields to limit output size and --dry-run before committing to an install.
loop-engineering
Shared loop-engineering reference for COG skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns. Invoke when designing or debugging a skill that iterates (search-verify-retry, scan-until-dry, fetch-retry-gate).
telnyx-messaging-hosted-curl
Set up hosted SMS numbers, toll-free verification, and RCS messaging. Use when migrating numbers or enabling rich messaging features. This skill provides REST API (curl) examples.