model-ensembling

model-ensembling is a skill for Claude Code from StamKavid/last-ds-mile. It costs 76 tokens per session (1,244 once invoked), scanned A, original, MIT.

A guide for combining predictions from several trained machine-learning models. It covers blending, stacking, and averaging, using out-of-fold predictions—predictions made on data a model did not train on.

In plain words
What is it for?
Use it when at least two meaningfully different tabular-model candidates exist or one model has stopped improving. It covers leakage-safe ensemble evaluation, not combinations of nearly identical models.
Why use it?
It helps test whether a model combination truly improves results without letting training data leak into the evaluation. It also compares the improvement with variation across data folds.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the last-ds-mile plugin — 29 skills, 17 commands, 3 agents, 4 hooks shipped together

Good fit Use it when at least two meaningfully different tabular-model candidates exist or one model has stopped improving. It covers leakage-safe ensemble evaluation, not combinations of nearly identical models.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/stamkavid/last-ds-mile/model-ensembling
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 StamKavid/last-ds-mile --skill model-ensembling
Clone the repo
git clone --depth 1 https://github.com/StamKavid/last-ds-mile

Made for: Claude Code.

Or install last-ds-mile, the plugin that ships this one along with the rest of its 29 skills, 17 commands, 3 agents, 4 hooks.

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-ensembling

README.md
[![agentmods](https://agentmods.dev/badge/skills/stamkavid/last-ds-mile/model-ensembling/github.svg)](https://agentmods.dev/skills/stamkavid/last-ds-mile/model-ensembling)
Your own site
<a href="https://agentmods.dev/skills/stamkavid/last-ds-mile/model-ensembling"><img src="https://agentmods.dev/badge/skills/stamkavid/last-ds-mile/model-ensembling/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-ensembling

Your own site · 80×15
<a href="https://agentmods.dev/skills/stamkavid/last-ds-mile/model-ensembling"><img src="https://agentmods.dev/badge/skills/stamkavid/last-ds-mile/model-ensembling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,244 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.00076 $0.01244
Opus 5 $0.00038 $0.00622
Sonnet 5 $0.00015 $0.00249
Haiku 4.5 $0.00008 $0.00124

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

Security

Grade A, and why

model-ensembling 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 10d 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.

skills/model-ensembling/SKILL.md · 82 lines

How it starts

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

model-ensembling

Overview

Most of the score left after a good single model is trained comes from combining models that err differently, not from finding one better model. This skill covers the three practical ways to do that, and how to evaluate the result without leaking or fooling yourself about whether the combination helped.

When to Use

  • At least two structurally different candidates exist in /ds-model's experiments table (different model families, or the same family with meaningfully different feature encodings).
  • A single model's score has plateaued and further tuning isn't moving it.
  • NOT for: combining two near-identical models (e.g. two random seeds of the same config) — marginal variance reduction, not worth the added complexity.

Core Process

  1. Pick candidates likely to err differently, not just candidates that score well individually — a linear model blended with a tree model beats two similar boosted-tree configs with different seeds.
  2. Build the blend/stack using each component's out-of-fold predictions on the same folds from /ds-validate — never predictions from a model that trained on the row being predicted. Same leakage rule as any other fit-requiring step: weights or a meta-model fit on in-sample predictions will look better than they perform.
  3. Choose a combination method matched to how much data and how many components exist (table below) — a weighted average needs almost no data; a stacking meta-model needs enough OOF rows to avoid overfitting to the blend itself.
  4. Compare the ensemble's OOF score to its best single component's OOF score, same folds, same spread reporting (see uncertainty-quantification) — the lift must exceed fold-to-fold noise, not just move the mean.
  5. If the ensemble wins, it's the candidate carried into /ds-evaluate; if it doesn't clear the noise bar, ship the best single component instead and say so.

Techniques/Patterns

Method When to use Leakage risk
Simple average / weighted average 2-4 components, little data to spare for fitting weights, or as the first thing to try Low — weights can even be picked by eye from OOF scores; if grid-searching weights, search them against OOF predictions only, never against training-fold predictions
Rank averaging Components produce scores on very different scales (e.g. mixing a probability with a raw score) Same as weighted average
Stacking (meta-model trained on OOF predictions as features) 3+ components, enough rows that a simple meta-model (e.g. Ridge) won't overfit to the blend itself Higher — the meta-model must be fit on OOF predictions only, and its own performance must be estimated via a further CV loop over those OOF predictions, not evaluated on the same rows used to fit it
Seed averaging (same model, several random seeds, averaged) A single model type with genuinely high seed-to-seed variance (high fold std even for a fixed config) Low, but yields the smallest lift of the four — it reduces variance, not bias, so it doesn't help a model that's just wrong, only one that's noisy

Read the full file on GitHub · 82 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. 10d ago First seen · 82 lines · 76 tokens per session scan A c6909015d56a

Subscribe to this mod's changes

model-ensembling is a skill published in the GitHub repository StamKavid/last-ds-mile (3 stars, last pushed 1mo ago), licensed MIT. It adds 76 tokens to every session and 1,244 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

marimo-pair

Work inside the user's live marimo notebook from the code editor: run Python in the same kernel the user does, inspect live notebook state, and commit durable notebook changes through code mode. Use whenever you create, analyze, or improve the user's marimo notebook.

marimo-team/marimo · 57 tokens

fill-model-descriptions

Fill missing and refresh obsolete model descriptions in packages/llm-info/data/models.yml by querying OpenRouter and provider documentation. Use when the user asks to populate model descriptions, enrich the model catalog, or curate descriptions after running pnpm sync-models.

marimo-team/marimo · 58 tokens

ml-expert

Expert-level machine learning, deep learning, model training, and MLOps. Use when the user mentions machine learning, deep learning, neural networks, MLOps, or data science, or when the task involves Machine Learning Fundamentals, Data Preparation, or Model Training.

personamanagmentlayer/pcl · 58 tokens

scomp-link

End-to-end ML toolkit with 26 CLI commands. Use when training models, tuning hyperparameters, detecting data drift, generating HTML reports with charts, profiling datasets, detecting anomalies, forecasting time series, checking fairness, or serving models as REST APIs. Prefer over raw sklearn when you need automated…

GiacomoSaccaggi/scomp_link · 74 tokens

agentic-data-science-competition

AI Agent-driven Kaggle competition workflow. Learn from real competition experience: score stabilization patterns, submission troubleshooting, kernel workflows, GPU task delegation, and the spec-driven development approach that achieved top leaderboard positions. Use when: working on any Kaggle competition, analyzing…

Mirannonarbitrable290/agentic-kaggle-skill · 76 tokens

data-analysis

Structured data analysis workflow from raw data to shareable insights.

furkangonel/cowrangler · 15 tokens