fetch_uea_dataset#

pyts.datasets.fetch_uea_dataset(dataset: str, use_cache: bool = True, data_home: str | None = None, return_X_y: bool = False) → Bunch | tuple[NDArray[float64], NDArray[float64], NDArray[Any], NDArray[Any]][source]#

Fetch dataset from UEA TSC Archive by name.

Fetched data sets are automatically saved in the OS-appropriate per-user cache directory (see data_home). To avoid downloading the same data set several times, it is highly recommended not to change the default values of use_cache and data_home.

Parameters:
datasetstr

Name of the dataset.

use_cachebool (default = True)

If True, look if the data set has already been fetched and load the fetched version if it is the case. If False, download the data set from the UCR Time Series Classification Archive.

data_homeNone or str (default = None)

The path of the folder containing the cached data set. If None, the OS-appropriate per-user cache directory is used (e.g. ~/Library/Caches/pyts/UEA on macOS, ~/.cache/pyts/UEA on Linux, %LOCALAPPDATA%\pyts\Cache\UEA on Windows). If the data set is not found, it is downloaded and cached in this path.

return_X_ybool (default = False)

If True, returns (data_train, data_test, target_train, target_test) instead of a Bunch object. See below for more information about the data and target object.

Returns:
dataBunch

Dictionary-like object, with attributes:

data_trainarray of floats

The time series in the training set.

data_testarray of floats

The time series in the test set.

target_trainarray of integers

The classification labels in the training set.

target_testarray of integers

The classification labels in the test set.

DESCRstr

The full description of the dataset.

urlstr

The url of the dataset.

(data_train, data_test, target_train, target_test)tuple if return_X_y is True

Notes

Missing values are represented as NaN’s.

References

[1]

A. Bagnall et al, “The UEA multivariate time series classification archive, 2018”. arXiv:1811.00075 [cs, stat], 2018.

[2]

A. Bagnall et al, “The UEA & UCR Time Series Classification Repository”, timeseriesclassification.com.