--- id: mlforecast version: "1.1.0" license: Apache Software License 2.0 license_treatment: permissive maintenance: active --- # mlforecast — Scalable machine learning based time series forecasting License: permissive · Maintenance: active · Downloads: 494.1K/mo ## 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 above — 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 pip install mlforecast uv add mlforecast 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_current - Install friction: low - Maintenance: active - Downloads: 494.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags time series forecasting with machine learning, scalable ML forecast training, distributed time series prediction, lag features and rolling windows, multi-series forecasting framework, feature engineering for time series, automated time series feature engineering, time-series-forecasting, distributed-training, feature-engineering [View on SkillFed](https://skillfed.io/packages/mlforecast) · [View on PyPI](https://pypi.org/project/mlforecast/)