load_regression#

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

Download/load regression problem from http://tseregression.org/.

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 http://tseregression.org/.

The list of problems this function can download from the website is in datasets/tser_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.

Parameters:
namestring, file name to load from
extract_pathoptional (default = None)

Path of the location for the data file. If none, data is written to os.path.dirname(__file__)/data/<name>/

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.

return_metadataboolean, default = True

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

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

The target response variable for each case in X

metadata: optional

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

Raises:
Raise ValueException if the requested return type is not supported