Skip to main content
NoriTSForecaster converts a time series into tabular features and predicts a requested number of future steps. It returns a pandas DataFrame containing the median forecast and any requested quantiles. Forecasting runs locally and requires the timeseries extra.

Quickstart

1

Install the forecasting dependencies

Follow Installation to install the timeseries extra for synthefy-nori.
2

Create a history DataFrame

Provide timestamp and target columns, ordered from oldest to newest.
3

Forecast the horizon

predict_df returns one row per future timestamp.
target is the median forecast. The other columns contain the requested quantiles.

Multiple series

Add an item_id column to forecast several series in one call. Nori fits and forecasts each series independently.

Future-known covariates

Use the lower-level predict method when a numeric feature is known across the forecast horizon. For example, a planned promotion is known before prediction and can be supplied for both the history and future rows.
The target remains univariate; the additional promotion column is an input feature. Only provide values available at prediction time, such as planned promotions, holidays, or scheduled prices. A realized future target or any value observed only after the forecast timestamp would be target leakage.

How it works

For each series, the forecaster creates rows indexed by (item_id, timestamp). Historical rows contain the observed target, and future rows contain generated time features. Numeric columns supplied in both the history and horizon are also used as covariates. Nori fits on the historical rows and predicts the future rows.
The default features include a running index, calendar sine and cosine values, and seasonal periods detected from the history. You can replace them with custom feature generators through features=.
Set quantiles= to choose the returned quantile columns. The target column contains the median forecast.

Configuration

context_df needs a timestamp and a target column (an optional item_id for multi-series frames). Returns a DataFrame indexed by (item_id, timestamp) over the horizon, with a target (median) column and one column per quantile level ("0.1", "0.5", …).
For frames already in (item_id, timestamp) form, predict(train_tsdf, test_tsdf) is the lower-level entry point. Use it when the horizon includes future-known covariates; predict_df constructs the horizon from timestamps alone.

Next steps

Continue with Text Features, or browse more local Nori workflows in Examples.