torch_timeseries.dataset.M4

class M4(root: str = './data', category='Daily')[source]

Bases: TimeSeriesDataset

The M4 forecasting competition, the continuation of the previous three ones organized by Spyros Makridakis (https://en.wikipedia.org/wiki/Makridakis_Competitions). collected from https://github.com/Mcompetitions/M4-methods/tree/master,we concate train,test files as the dataset.

Parameters: category (str): The category of the dataset to load. Can be one of [‘Daily’, ‘Hourly’, ‘Monthly’, ‘Quarterly’, ‘Weekly’, ‘Yearly’]. Default is ‘Daily’. root (str): The root directory to store the dataset. Default is ‘./data’.

Attributes: dir (str): The directory where the dataset is stored. dates (pd.DataFrame): The dates associated with the dataset. df (pd.DataFrame): The combined training and test data. data (np.ndarray): The time series data.

Methods: download(): Download the dataset from the M4 repository. _load(): Load the dataset from the local files.

_summary_

Parameters:

root (str) – data save location