skillfed

mlforecast

Scalable machine learning based time series forecasting

mlforecast v1.1.0 494.1K downloads/30d#6,352 on PyPI1,265
Permissive license Apache Software License 2.0 Active released

What it is and what it does

mlforecast is a time series forecasting framework that trains regressors on multiple series simultaneously. It automates feature engineering—lag creation, rolling statistics, date features—and handles the recursive prediction strategy needed to forecast multiple steps ahead. The core workflow is: load data in long format (one row per series-timestamp pair), define models and features, call fit() to train, then predict(n) to generate n-step forecasts.

The package is designed for production use and scales to large datasets through optional integration with Dask, Ray, or Spark clusters. It supports exogenous variables, static covariates, probabilistic forecasting via Conformal Prediction, and cross-validation for model evaluation. Dependencies include pandas for data handling, coreforecast for optimized feature computation, narwhals for dataframe abstraction, and optuna for hyperparameter optimization.

Use it for:

  • Train models across multiple time series and generate multi-step forecasts with automatic lag feature updates.
  • Optimize hyperparameters across multiple models using cross-validation splits cached during training.
  • Forecast demand by combining lag features, rolling statistics, and exogenous variables.
  • Distribute training across a Dask or Ray cluster to handle large numbers of time series.
  • Generate prediction intervals using Conformal Prediction to quantify forecast uncertainty.
  • Pretrain a model on one set of series and fine-tune on a different series with limited history.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

mlforecast trains machine learning models on time series data and generates forecasts, with built-in support for feature engineering, multiple models, and distributed training across remote clusters.

Yes. mlforecast is actively maintained, has no known vulnerabilities, and provides a production-ready framework for time series forecasting at scale. It combines efficient feature engineering with optional distributed training. Install if you need to forecast multiple time series with machine learning models; skip if you need deep learning or univariate statistical methods only.

Install

mlforecast on PyPI

pip

pip install mlforecast

uv

uv add mlforecast

poetry

poetry add mlforecast

Installing mlforecast

Before you install

Low install friction; pure Python wheel with 8 runtime dependencies including pandas, coreforecast, and optuna. Active maintenance with a release 35 days ago and ongoing commits.

License in practice

Apache Software License 2.0 is permissive; you can use, modify, and distribute mlforecast freely in commercial and private projects provided you include the license notice.

Quickstart

pip install mlforecast

from mlforecast import MLForecast
import pandas as pd

fcst = MLForecast(
    models=[model1, model2],
    freq='D',
    lags=[7, 14],
    date_features=['dayofweek']
)
fcst.fit(series)
predictions = fcst.predict(14)

Requires Python 3.10 or later; input data must be a pandas DataFrame in long format with columns for unique_id, ds (timestamp), and y (target value).

Verify before relying

  • Whether distributed training via Dask, Ray, or Spark requires additional cluster setup beyond the base install.
  • Performance characteristics when forecasting millions of time series—the description claims efficiency but provides no benchmarks.
  • Whether Conformal Prediction for prediction intervals requires additional dependencies or configuration.

Package facts

License Apache Software License 2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 8 — cloudpickle, coreforecast, fsspec, narwhals, optuna, pandas, scikit-learn, utilsforecast
Maintenance actively maintained — 35 days since the last release
Last repo commit
First released
Downloads 494,140/month — #6,352 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mlforecast-1.1.0-py3-none-any.whl

Keywords: python, forecast, forecasting, machine-learning, dask

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

time series forecasting with machine learningscalable ML forecast trainingdistributed time series predictionlag features and rolling windowsmulti-series forecasting frameworkfeature engineering for time seriesautomated time series feature engineering
time-series-forecastingdistributed-trainingfeature-engineering

More Artificial Intelligence packages

Further reading