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.How it works
Tabular conversion
Tabular conversion
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. Nori fits on the historical
rows and predicts the future rows.The time features
The time features
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=.Quantile output
Quantile output
Set
quantiles= to choose the returned quantile columns. The target
column contains the median forecast.Configuration
NoriTSForecaster parameters
NoriTSForecaster parameters
predict_df(context_df, prediction_length)
predict_df(context_df, prediction_length)
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", …).(item_id, timestamp) form, predict(train_tsdf, test_tsdf) is the lower-level entry point.