skforecast/skforecast

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

What it solves

Skforecast is designed to simplify time series forecasting by providing a unified interface for various modeling strategies. It bridges the gap between standard machine learning regressors (like those in scikit-learn) and the specific requirements of time series data, such as lag-based feature engineering and multi-step prediction strategies.

How it works

The library uses "Forecaster" objects as containers that manage the training and prediction process. It supports multiple strategies:

  • Recursive: Uses previous predictions as inputs for future steps.
  • Direct: Predicts multiple future steps simultaneously.
  • Multi-series: Handles multiple independent or dependent time series.

It integrates with any scikit-learn compatible estimator, including LightGBM, XGBoost, CatBoost, and Keras, and also provides support for statistical models (ARIMA, ETS) and foundation models.

Who it’s for

Data scientists and ML engineers who need to build, validate, and deploy production-ready time series forecasting models using a consistent API, whether they are using simple statistical methods or complex deep learning models.

Highlights

  • Scikit-learn Compatibility: Works with any estimator that follows the scikit-learn API.
  • Diverse Model Support: Supports everything from traditional statistical models (ARIMA/ETS) to RNNs/LSTMs and zero-shot foundation models.
  • Comprehensive Tooling: Includes built-in tools for feature engineering, hyperparameter tuning, and backtesting for realistic performance evaluation.
  • ** footnotes Probabilistic Forecasting:** Supports the generation of prediction intervals.
  • AI-Assisted Workflow: Provides machine-readable context files for LLMs to generate accurate code and an optional AI forecasting assistant (skforecast-ai).

Related

  • Project
  • Project
  • Project
  • Project
  • Project