skforecast
skforecast is an open-source Python library for machine learning–based time series forecasting.
skforecast is an open-source Python library for time series forecasting using machine learning models. It is designed to work with any estimator compatible with the scikit-learn API, including popular libraries such as LightGBM, XGBoost, CatBoost, Keras, and many others.
The library focuses on bridging classical machine learning workflows and time series forecasting, enabling flexible, scalable, and production-ready forecasting pipelines.
Purpose
Applying machine learning models to time series forecasting introduces additional complexity around data preparation, feature engineering, validation, and evaluation. skforecast addresses these challenges by providing a unified framework that adapts standard scikit-learn estimators to forecasting tasks.
Its goal is to make machine learning–based forecasting accessible, reliable, and scalable, from rapid prototyping to production deployment.
Core Features
Works with any scikit-learn–compatible estimator
Support for single-series and multi-series forecasting
Flexible recursive and direct forecasting strategies
Integrated feature engineering and window-based predictors
Hyperparameter tuning and model selection tools
Production-ready validation and backtesting workflows
Strong focus on interpretability and realistic evaluation
Forecaster Abstraction
Unified Forecaster Interface
At the core of skforecast is the Forecaster abstraction, a container that encapsulates:
Model training
Feature generation
Prediction logic
Validation and evaluation
All forecasters share a consistent API, regardless of the underlying strategy or model type.
Forecasting Strategies
skforecast supports multiple forecasting strategies, including:
Recursive forecasting
Direct forecasting
Multi-series forecasting
Multivariate forecasting
Probabilistic prediction
This allows users to select the most appropriate approach for their specific use case.
Feature Engineering and Exogenous Variables
Window-Based Features
skforecast provides built-in support for creating lagged features, rolling statistics, and custom window-based predictors.
Exogenous Features
External variables can be seamlessly integrated into forecasting models, enabling richer and more realistic predictive systems.
Model Evaluation and Validation
Backtesting and Validation
The library includes tools for:
Backtesting with realistic temporal splits
Multi-step forecast evaluation
Performance comparison across models and configurations
This ensures that forecast performance reflects real-world deployment conditions.
Scalability and Production Readiness
Integration with the Python ML Ecosystem
By leveraging scikit-learn conventions, skforecast integrates naturally with:
Feature transformers
Pipelines
Hyperparameter optimization tools
Model persistence and deployment workflows
This makes it suitable for both experimentation and production environments.
Use Cases
Demand, sales, and energy forecasting
Forecasting with gradient boosting and neural networks
Multi-series and hierarchical forecasting problems
Applied machine learning for time-dependent data
Research and benchmarking of forecasting strategies
Scientific Impact
skforecast is widely used in academic and applied research and is cited in numerous scientific publications across domains such as energy, sustainability, economics, and engineering.
Open Source
skforecast is released as open-source software under the BSD 3-Clause License and is actively maintained by its authors and contributors. The project is affiliated with NumFOCUS and supported by a growing international community.
GC.OS supports skforecast as an open-source project enabling scalable, interpretable, and production-ready machine learning–based time series forecasting.