
Ensemble ML for soil
Measures whether combining soil ML models can beat the best single model, and how
Ensemble ML for soil is an open-source agent skill for health and science. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 13
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Ensemble ML for soil
This skill helps an agent decide whether an ensemble of machine-learning models is worth building for soil mapping before any combiner is fitted. It has the agent compute out-of-fold predictions under spatial cross-validation, examine how the base learners' errors correlate, and derive the ambiguity term that sets the ceiling on any possible gain from combining them. If that ceiling is negligible, the guidance is to keep the best single model.
When a combination is justified, the skill walks through a spectrum of weighting schemes, from simple and R²-weighted averages to full Bates-Granger, non-negative least squares, and unconstrained Granger-Ramanathan regression. Each combiner is meant to be cross-fitted so that the data choosing the weights never also scores them. It also covers voting for classification, testing whether a margin is statistically meaningful, and a separate use of several models to quantify how much an estimate depends on modelling choice.
The guidance is written around R with mlr3 and includes a runnable pipeline, the spatial fold helpers CAST, blockCV and mlr3spatiotempcv, and a reporting checklist. The skill ships as a single SKILL.md with no bundled scripts.
When your agent uses it
Decide whether to combine machine-learning models at all, and if so how — by measuring the gain available before building any combiner. Covers the ambiguity/diversity ceiling, the weighting spectrum (simple average, R²-weighted, Bates–Granger, AIC/BIC, NNLS/SuperLearner, Granger–Ramanathan, learned meta-models, attention, per-pixel selection), out-of-fold stacking under spatial CV, cross-fitting the combiner, voting for classification, and significance testing of the margin. Use when someone proposes an ensemble, reports an ensemble gain, or asks whether their averaging scheme is "too simple". Triggers: "ensemble machine learning", "model stacking", "stacked generalisation", "SuperLearner", "meta-learner", "meta-model", "weighted average ensemble", "R2-weighted ensemble", "simple average ensemble", "Bates-Granger", "Granger-Ramanathan", "NNLS weights", "non-negative least squares", "caretStack", "mlr3pipelines stacking", "voting ensemble", "hard voting", "soft voting", "blending", "bagging vs boosting vs stac
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (28 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the dsm-soil plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add ccarbajal16/soil-dsm-skills
/plugin install dsm-soil@soil-dsm-skillsOr copy only this skill to ~/.claude/skills/ensemble-ml-for-soil:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccarbajal16/soil-dsm-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/ensemble-ml-for-soil &&
cp -R "$tmp/plugins/dsm-soil/skills/ensemble-ml-for-soil" ~/.claude/skills/ensemble-ml-for-soil &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/ensemble-ml-for-soil inside it instead.
Copy the skill folder to ~/.agents/skills/ensemble-ml-for-soil to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccarbajal16/soil-dsm-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/ensemble-ml-for-soil &&
cp -R "$tmp/plugins/dsm-soil/skills/ensemble-ml-for-soil" ~/.agents/skills/ensemble-ml-for-soil &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/ensemble-ml-for-soil inside it instead.
Copy the skill folder to ~/.cursor/skills/ensemble-ml-for-soil to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccarbajal16/soil-dsm-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/ensemble-ml-for-soil &&
cp -R "$tmp/plugins/dsm-soil/skills/ensemble-ml-for-soil" ~/.cursor/skills/ensemble-ml-for-soil &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/ensemble-ml-for-soil inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/ccarbajal16/soil-dsm-skills.git --path plugins/dsm-soil/skills/ensemble-ml-for-soilOr copy the folder to ~/.gemini/skills/ensemble-ml-for-soil yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/ensemble-ml-for-soil:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccarbajal16/soil-dsm-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/ensemble-ml-for-soil &&
cp -R "$tmp/plugins/dsm-soil/skills/ensemble-ml-for-soil" ~/.copilot/skills/ensemble-ml-for-soil &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/ensemble-ml-for-soil inside it instead.
Get the folder:
git clone --depth 1 https://github.com/ccarbajal16/soil-dsm-skills.gitThen copy soil-dsm-skills/plugins/dsm-soil/skills/ensemble-ml-for-soil into your agent's skills folder as ensemble-ml-for-soil. Agents that support SKILL.md read one folder per skill.
What it does
- Ensemble gain ceiling
- Computes the ambiguity term from out-of-fold errors to estimate the maximum gain available before building a combiner.
- Spatial out-of-fold stacking
- Builds out-of-fold prediction matrices using spatial block folds rather than random splits.
- Weighting scheme comparison
- Compares simple, R²-weighted, Bates-Granger, NNLS and Granger-Ramanathan combiners under cross-fitting.
- Error correlation diagnostics
- Examines correlations and covariance of base-learner errors to judge whether members add diversity.
- Classification voting guidance
- Explains hard and soft voting and how they relate to regression averaging schemes.
- Gain significance testing
- Describes Friedman and Nemenyi tests or repeated CV for checking whether an ensemble margin is real.
Good for
- Check whether stacking my RF and XGBoost soil models is worth the effort
- Fit a cross-fitted Bates-Granger or NNLS combiner over spatial folds
- Review a paper's reported ensemble gain for evaluation leakage
- Decide whether to combine my soil model with SoilGrids per region
- Test whether a small accuracy margin between ensemble members is significant
Ensemble ML for soil FAQ
What does the skill need to run?
The guidance uses R 4.5.3 with mlr3 and the spatial fold packages CAST, blockCV or mlr3spatiotempcv. The skill folder includes only its SKILL.md file and no bundled scripts.
Does Ensemble ML for soil recommend always using a stacked ensemble?
No. It first measures the ambiguity ceiling, and if the base learners barely disagree it says to ship the best single model instead.
Which combiner does Ensemble ML for soil recommend?
It recommends a full Bates-Granger combiner, then NNLS, both cross-fitted. It advises against using a bare unconstrained lm() combiner.
Does Ensemble ML for soil cover classification tasks?
Yes. It describes hard and soft voting as the classification counterparts of simple and weighted averaging, noting that soft voting needs calibrated probabilities.
How do I install Ensemble ML for soil in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/ensemble-ml-for-soil to use it in all your projects, or to .claude/skills/ensemble-ml-for-soil in one project. Or install the dsm-soil plugin, which includes it: /plugin marketplace add ccarbajal16/soil-dsm-skills, then /plugin install dsm-soil@soil-dsm-skills.
Does Ensemble ML for soil run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Ensemble ML for soil?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Ensemble ML for soil?
The closest alternatives to Ensemble ML for soil are ML for soil prediction, Soil map validation, Hybrid process ML soc, Soil fertility mapping and Digital soil mapping workflow.
Where this comes from
- Description: from the skill's own SKILL.md.
More from ccarbajal16/soil-dsm-skills

Guides an agent through planning a digital soil mapping project from covariates
- Open source
- 13 GitHub stars
- Health and science

Guides an agent in building hybrid process-plus-ML models for soil carbon change over time
- Open source
- 13 GitHub stars
- Health and science

Guides an agent in choosing, tuning and interpreting ML models for soil property
- Open source
- 13 GitHub stars
- Health and science

Guides an agent through setting up, calibrating and checking RothC soil carbon models
- Open source
- 13 GitHub stars
- Health and science

Guides an agent through soil organic carbon stock change measurement and crediting
- Open source
- 13 GitHub stars
- Health and science

Guides an agent through multi-property soil fertility maps and composite fertility indices
- Open source
- 13 GitHub stars
- Health and science
