Skip to main content
A forecast predicts the future values of a series measured at regular steps: daily sales of an item in a store, hourly electricity load, weekly calls to a service desk. tabSutra forecasts one series or many thousands in one request. It does not need a model per series, and it does not need to be trained on your history first.

The data

Send the history as a table with one row per series and step.
sales.csv
  • series_column names the column, or the columns, that identify a series. Here a series is one item in one store, so it is ["store", "sku"]. Leave it out when the table holds one series.
  • time_column holds the date or the time of each step.
  • target is the column to forecast.
Every other column is read as an input. How it is read depends on whether you also know its future values.

Forecast

The settings are: The answer has one prediction per series and future step.

Many series together

The series in one request are read together. A series with a short history can borrow from the others, so a new item or a new store gets a sensible forecast from its first weeks. For the same reason, send related series in the same request, such as all the items of one store, or one item across stores.

Intermittent and seasonal series

Many business series are mostly zeros with an occasional sale, such as spare parts or slow-moving items. Others have strong weekly or yearly patterns. The model handles both without a choice of method on your side. For intermittent series, read the quantiles rather than the mean: the median of a slow item is often zero, and the upper quantiles tell you how much stock covers a good week.

Adding up forecasts

The mean of a total is the sum of the means. So to forecast a store’s total, or a week from its days, add the means. Do not add quantiles: the 90% quantile of a week is not the sum of the 90% quantiles of its days. If you need the quantiles of a total, forecast the total as a series of its own.

Evaluate

/v1/evaluate-forecast holds out the last horizon steps of every series, forecasts them from the history before, and scores the result.
With windows set to more than one, the test is repeated from several start dates, each one horizon steps earlier, and the scores are averaged. The scores are: The baseline is the seasonal naive forecast: the value of the same step one season earlier, such as the same weekday last week.

Files

/v1/forecast-file takes the history as a CSV or Parquet file in history, and the inputs known in advance in future. It returns JSON, CSV or Parquet, as you choose with format.