# API Reference


## Data preparation


Prepare and validate historic, holiday, and temperature data.


[preprocessing.prepare_historic()](preprocessing.prepare_historic.md#ambforecast.preprocessing.prepare_historic)  
Prepare historic data.

[preprocessing.validate_historic()](preprocessing.validate_historic.md#ambforecast.preprocessing.validate_historic)  
Validate historic data.

[preprocessing.prepare_holidays()](preprocessing.prepare_holidays.md#ambforecast.preprocessing.prepare_holidays)  
Prepare holiday data.

[preprocessing.validate_holidays()](preprocessing.validate_holidays.md#ambforecast.preprocessing.validate_holidays)  
Validate holiday data.

[preprocessing.expand_holiday_windows()](preprocessing.expand_holiday_windows.md#ambforecast.preprocessing.expand_holiday_windows)  
Create a row for each holiday date - no lower/upper windows.

[preprocessing.prepare_temp()](preprocessing.prepare_temp.md#ambforecast.preprocessing.prepare_temp)  
Prepare midas air temperature data.

[preprocessing.interpolate_temp()](preprocessing.interpolate_temp.md#ambforecast.preprocessing.interpolate_temp)  
Interpolate missing air temperature data.

[preprocessing.validate_temp()](preprocessing.validate_temp.md#ambforecast.preprocessing.validate_temp)  
Validate midas air temperature data.


## Data splitting


Create train/test splits and rolling forecast origin samples.


[splits.train_test_split()](splits.train_test_split.md#ambforecast.splits.train_test_split)  
Create a single train/test split.

[splits.rolling_forecast_origin()](splits.rolling_forecast_origin.md#ambforecast.splits.rolling_forecast_origin)  
Create rolling forecast origin train/test samples.


## ARIMA


Configure and run ARIMA forecasts.


[arima.ARIMAParams](arima.ARIMAParams.md#ambforecast.arima.ARIMAParams)  
Parameters for the ARIMA model.

[arima.arima()](arima.arima.md#ambforecast.arima.arima)  
Fit ARIMA model and generate forecast.


## Prophet


Configure and run Prophet forecasts.


[prophet.ProphetRegressor](prophet.ProphetRegressor.md#ambforecast.prophet.ProphetRegressor)  
Configuration and data for a single Prophet regressor.

[prophet.ProphetParams](prophet.ProphetParams.md#ambforecast.prophet.ProphetParams)  
Parameters for the Prophet model.

[prophet.prophet()](prophet.prophet.md#ambforecast.prophet.prophet)  
Fit Prophet model and generate forecast.


## Naive benchmark


Configure and run Seasonal Naive forecasts.


[naive.SNaiveParams](naive.SNaiveParams.md#ambforecast.naive.SNaiveParams)  
Parameters for the SNaive model.

[naive.snaive()](naive.snaive.md#ambforecast.naive.snaive)  
Fit Seasonal Naive model and generate forecast.


## Running forecasts


Run individual, multi-area/metric, and cross-validation forecasts.


[forecast.run_single_forecast()](forecast.run_single_forecast.md#ambforecast.forecast.run_single_forecast)  
Run a forecast for one metric and area.

[forecast.run_forecasts()](forecast.run_forecasts.md#ambforecast.forecast.run_forecasts)  
Run forecasts for every metric and area, sequentially or in parallel.

[forecast.run_cross_validation()](forecast.run_cross_validation.md#ambforecast.forecast.run_cross_validation)  
Run rolling forecast origin cross-validation.


## Ensembles


Combine forecasts.


[ensemble.ensemble()](ensemble.ensemble.md#ambforecast.ensemble.ensemble)  
Calculate the mean of multiple forecasts.


## Forecast evaluation


Calculate forecast accuracy measures.


[errors.forecast_errors()](errors.forecast_errors.md#ambforecast.errors.forecast_errors)  
Calculate forecast accuracy measures for a single metric/area/fold.

[errors.calculate_errors()](errors.calculate_errors.md#ambforecast.errors.calculate_errors)  
Calculate forecast accuracy measures for every metric/area/fold.


## Plotting


Visualise results.


[plot.plot_forecast()](plot.plot_forecast.md#ambforecast.plot.plot_forecast)  
Plot historic data and forecast with 95% prediction intervals.

[plot.plot_cross_validation()](plot.plot_cross_validation.md#ambforecast.plot.plot_cross_validation)  
Plot observed and forecast values from all cross-validation folds.

[plot.plot_observed_against_forecast()](plot.plot_observed_against_forecast.md#ambforecast.plot.plot_observed_against_forecast)  
Scatter plot of observed values against forecast values.

[plot.plot_holiday_coverage()](plot.plot_holiday_coverage.md#ambforecast.plot.plot_holiday_coverage)  
Visualise when each holiday occurs over the whole time series.

[plot.plot_error_over_time()](plot.plot_error_over_time.md#ambforecast.plot.plot_error_over_time)  
Plot error over time.

[plot.plot_error_boxplot()](plot.plot_error_boxplot.md#ambforecast.plot.plot_error_boxplot)  
Plot cross-validation error distributions by forecast horizon.
