Other
Hourly
Daily
Weekly
Monthly
Quarterly
Yearly
Download data class
M4
M4.async_download
| Name | Type | Description | Default |
|---|---|---|---|
directory | str | Directory path to download dataset. | required |
M4.download
M4.load
Returns:
Evaluation class
M4Evaluation
M4Evaluation.evaluate
| Name | Type | Description | Default |
|---|---|---|---|
directory | str | Directory where data will be downloaded. | required |
group | str | Group name. Allowed groups: ‘Yearly’, ‘Quarterly’, ‘Monthly’, ‘Weekly’, ‘Daily’, ‘Hourly’. | required |
y_hat | Union[ndarray, str] | Group forecasts as numpy array or benchmark url from https://github.com/Nixtla/m4-forecasts/tree/master/forecasts. | required |
| Type | Description |
|---|---|
DataFrame | pd.DataFrame: DataFrame with columns OWA, SMAPE, MASE and group as index. |
M4Evaluation.load_benchmark
| Name | Type | Description | Default |
|---|---|---|---|
directory | str | Directory where data will be downloaded. | required |
group | str | Group name. Allowed groups: ‘Yearly’, ‘Quarterly’, ‘Monthly’, ‘Weekly’, ‘Daily’, ‘Hourly’. | required |
source_url | str | Optional benchmark url obtained from https://github.com/Nixtla/m4-forecasts/tree/master/forecasts. If None returns Naive2. | None |
| Type | Description |
|---|---|
ndarray | np.ndarray: Numpy array of shape (n_series, horizon). |
URL-based evaluation
The methodevaluate from the class
M4Evaluation
can receive a url of a benchmark uploaded to the M4
competiton.
The results compared to the on-the-fly evaluation were obtained from the
official
evaluation.
Numpy-based evaluation
Also the methodevaluate can recevie a numpy array of forecasts.

