skforecast/skforecast

Python library for time series forecasting using scikit-learn compatible models, statistical methods, and foundation models

What it solves

Skforecast provides a unified API for time series forecasting, allowing users to move from prototyping to production with a single workflow. It simplifies the process of using various forecasting models—ranging from traditional statistical methods to modern machine learning and foundation models—without needing to learn different APIs for each.

How it works

The library implements a consistent interface for training, prediction, and backtesting across different model types:

  • Machine Learning: Integrates with any scikit-learn compatible regressor (e.g., LightGBM, XGBoost, CatBoost) using recursive or direct strategies.
  • Foundation Models: Enables zero-shot forecasting using pre-trained models like Chronos-2, TimesFM, and Moirai-2.
  • Statistical Models: Supports ARIMA, SARIMAX, ETS, and ARAR with automatic model selection.
  • Deep Learning: Utilizes recurrent neural networks (RNN, LSTM) built with Keras.

Who it’s for

Data scientists and ML engineers who need to build, tune, and deploy production-ready time series forecasting models using Python.

Highlights

  • Unified API: One interface for ML, statistical, and foundation models.
  • Production-Ready Tools: Includes backtesting, probabilistic forecasting (bootstrapping, conformal prediction), and hyperparameter tuning via Optuna.
  • Feature Engineering: Built-in support for rolling statistics, calendar features, and exogenous variables.
  • Global Models: Ability to forecast multiple time series simultaneously with a single model.
  • Explainability: Integration with SHAP values and feature importance for model transparency.

Related

  • Project
  • Project
  • Project
  • Project
  • Project