skforecast/skforecast-ai/forecasting-single-series
- community
Checking that the SKILL.md file is still in the repository.
Forecasts a single time series using ForecasterRecursive or ForecasterDirect. Covers data preparation, model creation, training, prediction, backtesting, and prediction intervals. Use when the user needs to predict future values of one time series.
Install
npx vskill@latest install skforecast/skforecast-ai/forecasting-single-seriesSKILL.md
The same SKILL.md was published earlier as skforecast/skforecast/forecasting-single-series.
Forecasting a Single Time Series
When to Use
Use this workflow when you have one time series and want to predict its future values.
- ForecasterRecursive: Default choice. Uses its own predictions as inputs for multi-step forecasting. Works with any sklearn-compatible regressor.
- ForecasterDirect: Trains one model per forecast step. Better when the relationship between lags and target changes across the horizon.
Related skills
- Prerequisite:
choosing-a-forecaster(decide between Recursive and Direct based on the data) - Prerequisite:
autocorrelation-and-lag-selection(pick thelagsargument from ACF/PACF analysis) - Prerequisite:
feature-engineering(assemble the rolling, calendar, and exogenous features) - Alongside:
baseline-forecasting(establish a naive reference to benchmark the model against) - Next:
hyperparameter-optimization(tune the forecaster once a baseline is trained) - Next:
prediction-intervals(add bootstrap or conformal intervals on top of the point forecasts)
Stop Conditions
Scan before writing code. Each row lists a rule, the symptom when it is broken, and the recovery. Full pitfall catalog: the troubleshooting-common-errors skill.
| Rule | Symptom | Recovery | |
|---|---|---|---|
| Set the index frequency before fitting | ValueError: ... must be a DatetimeIndex with frequency | Call data = data.asfreq('h') (or the correct alias) on y and exog | |
exog passed to predict() must cover every future step | exog length / index error, or the forecast stops short | Slice exog to the full horizon: one row per step, dates matching the forecast | |
Fit with store_in_sample_residuals=True before predict_interval(method='bootstrapping') | No in-sample residuals stored / empty residuals | Refit: forecaster.fit(y=y_train, store_in_sample_residuals=True) | |
| Split chronologically, never shuffle | Over-optimistic metrics, leakage | Use a time-ordered split (TimeSeriesFold); do not random-split |
Complete Workflow
With Exogenous Variables
Using ForecasterDirect
Common Mistakes
- Missing frequency on index: Always call
data.asfreq('h')(or'D','MS', etc.). - NaN in data: Forecasters reject NaN by default. Use
dropna_from_series=Trueto drop incomplete rows, or keepdropna_from_series=False(default) with NaN-tolerant estimators (LightGBM, CatBoost, HistGradientBoosting, XGBoost hist). Alternatively, impute missing values first. - Exog not covering forecast horizon: The exogenous DataFrame for
predict()must have rows for every future step. - Random train/test split: Time series must be split chronologically, never shuffled.
- Forgetting `store_in_sample_residuals=True`: Required before calling
predict_interval()withmethod='bootstrapping'on a standalone forecaster. During backtesting, residuals are computed automatically.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskforecast_ai/skills/forecasting-single-series/SKILL.md
Popularity
- Repository stars
- 50
- Repository forks
- 6
- 7-day trend score
- 20
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/skforecast/skforecast-ai/forecasting-single-series)