forecast.run_forecasts()

Run forecasts for every metric and area, sequentially or in parallel.

Usage

Source

forecast.run_forecasts(
    forecast_function, train, params, test=None, horizon=None, cores=1
)

Parameters

forecast_function: prophet | arima

Forecasting function to run.

train: pd.DataFrame

Historic data used to train the model.

params: ProphetParams | ARIMAParams

Parameters for the selected forecasting model.

test: pd.DataFrame = None

Held-out data to forecast and later compare against. If None, provide horizon instead,

horizon: int = None

Number of days to forecast after the final training date. If None, provide test instead.

cores: int = 1
Number of CPU cores to use. Set to 1 for sequential processing or -1 to use all available cores.

Returns

pd.DataFrame
Forecasts for every metric and area.