load_classification(name, split=None, extract_path=None, return_metadata=False)[source]#

Load a classification dataset.

If you want to load a problem from a local file, specify the location in extract_path. This function assumes the data is stored in format <extract_path>/<name>/<name>_TRAIN.ts and <extract_path>/<name>/<name>_TEST.ts. If you want to load a file directly from a full path, use the function load_from_tsfile` directly. If you do not specify extract_path, or if the problem is not present in extract_path it will attempt to download the data from https://timeseriesclassification.com/.

The list of problems this function can download from the website is in datasets/tsc_lists.py. This function can load timestamped data, but it does not store the time stamps. The time stamp loading is fragile, it will only work if all data are floats.

Data is assumed to be in the standard .ts format: each row is a (possibly multivariate) time series. Each dimension is separated by a colon, each value in a series is comma separated. For examples see aeon.datasets.data. ArrowHead is an example of a univariate equal length problem, BasicMotions an equal length multivariate problem.


Name of data set. If a dataset that is listed in tsc_data_lists is given, this function will look in the extract_path first, and if it is not present, attempt to download the data from www.timeseriesclassification.com, saving it to the extract_path.

splitNone or str{“train”, “test”}, default=None

Whether to load the train or test partition of the problem. By default it loads both into a single dataset, otherwise it looks only for files of the format <name>_TRAIN.ts or <name>_TEST.ts.

extract_pathstr, default=None

the path to look for the data. If no path is provided, the function looks in aeon/datasets/data/. If a path is given, it can be absolute, e.g. C:/Temp/ or relative, e.g. Temp/ or ./Temp/.

return_metadataboolean, default = True

If True, returns a tuple (X, y, metadata)

X: np.ndarray or list of np.ndarray
y: numpy array

The class labels for each case in X

metadata: optional

returns the following meta data ‘problemname’,timestamps, missing,univariate,equallength, class_values targetlabel should be false, and classlabel true


>>> from aeon.datasets import load_classification
>>> X, y = load_classification(name="ArrowHead")