Nixtla/mlforecast

Scalable machine 🤖 learning for time series forecasting.

What it solves

It addresses the performance and scalability limitations of existing Python libraries for machine learning-based time series forecasting. It provides a framework that can handle millions of time series and scale to massive datasets using remote clusters, making it suitable for production environments.

How it works

mlforecast acts as a wrapper around any machine learning regressor that follows the scikit-learn API (using .fit and .predict methods). It automates the complex parts of time series forecasting by providing efficient feature engineering—such as lags, rolling means, expanding means, and date features—and handling target transformations. It uses a recursive strategy to update features automatically during the prediction phase.

Who it’s for

Data scientists and ML engineers who need to perform scalable time series forecasting using machine learning models and who want a familiar scikit-learn-like interface.

Highlights

  • High Scalability: Compatible with pandas, polars, spark, dask, and ray for distributed training on remote clusters.
  • Fast Feature Engineering: Optimized implementations of time series feature generation.
  • Probabilistic Forecasting: Supports prediction intervals via Conformal Prediction.
  • Flexible Inputs: Supports exogenous variables and static covariates.
  • Transfer Learning: Ability to pretrain a model on one set of time series and apply it to another.

Related

  • Project
  • Project
  • Project
  • Project
  • Project