wenmin-wu/ds-skills/expanding-window-stacking
Claude Code and agent skill by wenmin-wu/ds-skills
- community
Checking that the SKILL.md file is still in the repository.
Walk-forward stacking ensemble that trains base models on expanding windows and a meta-learner on their out-of-fold predictions across time
Install
npx vskill@latest install wenmin-wu/ds-skills/expanding-window-stackingSKILL.md
Expanding-Window Stacking
Overview
Standard K-fold stacking leaks future information in time series. Expanding-window stacking respects temporal order: base models are trained on data up to time t, predict t+1, and the meta-learner trains on these walk-forward out-of-fold predictions. This produces a properly validated stacking ensemble for forecasting tasks.
Quick Start
Workflow
- Sort data by time, define minimum training window (e.g., 12 months)
- For each subsequent time period, train all base models on data up to that period
- Generate out-of-fold predictions for the held-out period
- Collect all OOF predictions into a matrix
- Train a meta-learner (Ridge, linear regression) on the OOF prediction matrix
- For final predictions, train base models on all data, stack with the fitted meta-learner
Key Decisions
- Minimum window: 12 months gives base models enough data; shorter windows increase variance
- Meta-learner: Ridge regression with small alpha prevents overfitting to correlated base predictions
- Base diversity: combine XGBoost, LightGBM, CatBoost, and linear models for maximum gain
- Retraining frequency: retrain base models every period for freshness vs. every N periods for speed
- vs purged K-fold: expanding window is stricter (no future leakage at all) but produces fewer OOF samples
References
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/timeseries/expanding-window-stacking/SKILL.md
Popularity
- Repository stars
- 46
- Repository forks
- 4
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wenmin-wu/ds-skills/expanding-window-stacking)