module datasetsforecast.m5
class M5
M5(source_url: str = ‘https://github.com/Nixtla/m5-forecasts/raw/main/datasets/m5.zip’)
method __init__
method download
directory(str): Directory path to download dataset.
method load
directory(str): Directory where data will be downloaded.cache(bool): IfTruesaves and loads.
class M5Evaluation
method aggregate_levels
y_hat(pd.DataFrame): Forecasts as wide pandas dataframe with columns [‘unique_id’].categories(pd.DataFrame, optional): Categories of M5 dataset (not used). Defaults to None.
pd.DataFrame: Aggregated forecasts as wide pandas dataframe with columns [‘unique_id’].
method evaluate
directory(str): Directory where data will be downloaded.validation(bool): Wheter perform validation evaluation. Default False, return test evaluation.y_hat(Union[pd.DataFrame, str]): Forecasts as wide pandas dataframe with columns [‘unique_id’] and forecasts or benchmark url fromhttps: //github.com/Nixtla/m5-forecasts/tree/main/forecasts.
pd.DataFrame: DataFrame with columns OWA, SMAPE, MASE and group as index.
method load_benchmark
directory(str): Directory where data will be downloaded.source_url(str, optional): Optional benchmark url obtained fromhttps: //github.com/Nixtla/m5-forecasts/tree/master/forecasts. IfNonereturns the M5 winner.validation(bool): Wheter return validation forecasts. Default False, return test forecasts.
np.ndarray: Numpy array of shape (n_series, horizon).
This file was automatically generated via lazydocs.

