skforecast/skforecast-ai/forecasting-multiple-series
- community
Checking that the SKILL.md file is still in the repository.
Forecasts multiple time series simultaneously using a global model with ForecasterRecursiveMultiSeries or ForecasterDirectMultiVariate. Covers data formats, encoding, per-series transformers, and multi-series backtesting. Use when the user has two or more related time series.
Install
npx vskill@latest install skforecast/skforecast-ai/forecasting-multiple-seriesSKILL.md
The same SKILL.md was published earlier as skforecast/skforecast/forecasting-multiple-series.
Forecasting Multiple Time Series
When to Use
- ForecasterRecursiveMultiSeries: A single global model learns patterns across many series. Each series is predicted independently but the model shares parameters. Best default for multi-series.
- ForecasterDirectMultiVariate: Uses values from multiple series as input features to predict one target series. Use when series are strongly correlated and influence each other.
Related skills
- Prerequisite:
choosing-a-forecaster(decide between MultiSeries, MultiVariate, Rnn, or Foundation for multi-series problems) - Prerequisite:
autocorrelation-and-lag-selection(analyse representative series to inform the sharedlagsargument) - Prerequisite:
feature-engineering(build per-series exogenous and rolling features) - Next:
hyperparameter-optimization(tune the global model across series) - Next:
prediction-intervals(add intervals to the multi-series 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 | |
|---|---|---|---|
Use backtesting_forecaster_multiseries and the *_multiseries search functions | backtesting_forecaster / grid_search_forecaster raises on a multi-series forecaster | Call the _multiseries variant with series= instead of y= | |
ForecasterDirectMultiVariate defaults to transformer_series=StandardScaler() | Series are scaled unexpectedly (other forecasters default to None) | Pass transformer_series=None explicitly if you do not want scaling | |
exog and series formats can be combined (wide, long or dict); a dict or long exog is matched to the series by name | MissingExogWarning about series without exog, whose exog values are NaN | Use the series names as the keys of the exog dict (or the series IDs of a long exog). A wide exog is shared by all series and aligned with each one by date | |
Regressors with native categorical support need encoding='ordinal_category' | Categoricals silently encoded as plain ordinals, degrading the model | Set encoding='ordinal_category' for LightGBM / CatBoost / XGBoost / HistGBR |
Data Formats
ForecasterRecursiveMultiSeries accepts three input formats:
- Wide DataFrame — columns are series, index is datetime:
``python # series_1 series_2 series_3 # 2020-01-01 1.0 2.5 3.1 # 2020-01-02 1.2 2.3 3.4 ``
- Dictionary —
{series_id: pd.Series}:
``python {'series_1': pd.Series([1.0, 1.2, ...]), 'series_2': pd.Series([2.5, 2.3, ...])} ``
Note: Long-format DataFrames are not directly accepted. Usereshape_series_long_to_dict()to convert long format to a dictionary first (see Data Reshaping Utilities below).
Complete Workflow
With Exogenous Variables
ForecasterDirectMultiVariate
Data Reshaping Utilities
Common Mistakes
- Mismatched series lengths: ForecasterRecursiveMultiSeries handles different-length series if
dropna_from_series=True. - Wrong encoding for categorical regressor: Use
encoding='ordinal_category'with regressors that natively handle categoricals (LightGBM, CatBoost). - Exog keys not matching the series names: Any exog format (wide, long or dict) can be combined with any series format. A wide exog is shared by all series and aligned with each one by date; a dict or long exog must use the series names as keys, otherwise those series get NaN exog values (
MissingExogWarning). - Forgetting `levels` parameter: By default
predict()forecasts all series. Uselevelsto limit predictions. - Unexpected scaling in ForecasterDirectMultiVariate:
transformer_seriesdefaults toStandardScaler(), unlike other forecasters that default toNone. Settransformer_series=Noneexplicitly if you don't want automatic scaling.
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-multiple-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-multiple-series)