Time series forecasting

Forecast future values: date column, horizon, time-ordered folds, models and the forecast view.

Time series forecasting predicts future values of a number that is recorded over time: daily sales, monthly demand, hourly energy use. Unlike regression, the order of the rows matters, so mlflow never shuffles them and always tests a model on periods that come after the periods it learned from.

When to use it

Use forecasting when you have one column to forecast and rows in time order, and you want the next periods. If the rows are independent and time is only one of many features, Regression may fit better.

Set it up

Create the pipeline

Open Pipelines, select New and then New pipeline. Set Task to Time series forecasting, pick the Dataset and choose the Target column: the series to forecast. A single date column becomes the time index; the other columns are used as exogenous inputs, that is, extra information known for each period. The dataset list shows only data sources added as CSV files.

Set the forecast settings

Open the Models part of the pipeline editor. The Forecast settings card has:

  • Date column: the column of dates that orders the series. Automatic picks the only column that looks like dates. With no date column, rows are taken to be in time order already; with several candidates you must pick one. Missing or repeated dates stop training with an explanation. No step may use the date column.
  • Forecast horizon: how many future periods each forecast covers, from 1 to 500. The default is 12.
  • CV folds: from 2 to 10. The default is 3.
  • Fold strategy: Expanding (the default) or Sliding.

Choose algorithms and train

Tick one or more algorithms and select Train N models. The Cross-validation card used by classification and regression does not appear: time series folds live in the forecast settings, and group folds do not apply.

Forecast horizon and folds

The last h periods of the series (the horizon) are held out to score the models. Cross-validation then works backwards in time: each fold trains on the past and forecasts the next h periods. With Expanding, every fold trains on all history up to its cutoff, so later folds see more data. With Sliding, every fold trains on a window of the same length that moves forward, which suits series whose behavior drifts.

The series must be long enough: it needs at least (folds + 1) × horizon + 1 rows. With the defaults, 3 folds and a horizon of 12, that is 49 rows. If the dataset is shorter, mlflow tells you how many rows the settings need and disables training until you lower the horizon or the number of folds. See Cross-validation and group folds.

Algorithms

The catalog has simple baselines (Naive, Grand Means, Seasonal Naive, Polynomial Trend), classical statistical models (ARIMA, Auto ARIMA, Exponential Smoothing, ETS, Theta, STLF, Croston, and BATS, TBATS and Prophet when installed) and regression models wrapped for forecasting, named like "Random Forest w/ Cond. Deseasonalize & Detrending". Seasonal models appear only when the series has a seasonal period greater than 1. See the Algorithms catalog.

Tuning (random, grid and Bayesian search) is not available for time series.

Metrics

The leaderboard shows MASE, RMSSE, MAE, RMSE, MAPE, SMAPE, R2 and COVERAGE. The default ranking metric is MASE, where a value below 1 means the model beats a naive seasonal forecast on the training history. All are lower-is-better except R2 and COVERAGE. See the Metrics reference.

The Forecast tab

Runs of this task have an extra Forecast tab next to Leaderboard, Compare, Log and Comments. After the run succeeds it offers four views:

  • Forecast: point predictions over the holdout horizon against the actual values, with an optional confidence band.
  • Decomposition: the trend, seasonal and residual parts of the series.
  • Residuals: diagnostics of the forecast errors.
  • ACF / PACF: autocorrelation and partial autocorrelation, which show how strongly each period relates to earlier ones.

Target transforms

A step in Pipeline Studio that selects only the target column transforms the series itself, and mlflow reverses the transform on the forecasts. Only invertible, value-only steps are allowed on the target: Standard Scaler, Min-Max Scaler, Robust Scaler, MaxAbs Scaler, Power Transformer and Log Transform. A step on the target cannot also include other columns; split it into two steps. Steps on the other columns prepare the exogenous inputs. See Preprocessing steps.

Next steps

Learn the theory

Lessons on learning.mlflow.es that explain the ideas behind this page.

Updated 2026-11-22