load_basic_motions(split=None, return_X_y=True, return_type=None)[source]#

Load the BasicMotions time series classification problem and returns X and y.

This is an equal length multivariate time series classification problem. It loads a 4 class classification problem with number of cases, n, where n = 80 (if split is None) or 40 (if split is “train”/”test”) of series length m = 100.

split: None or str{“train”, “test”}, optional (default=None)

Whether to load the train or test partition of the problem. By default it loads both.

return_X_y: bool, optional (default=True)

If True, returns (time series, target) separately as X and y instead of a single data structure.

return_type: None or str{“numpy3d”, “nested_univ”},

optional (default=None). Controls the returned data structure.

X: The time series data for the problem. If return_type is either

“numpy2d”/”numpyflat”, it returns 2D numpy array of shape (n,m), if “numpy3d” it returns 3D numpy array of shape (n,6,m) and if “nested_univ” or None it returns a nested pandas DataFrame of shape (n,6), where each cell is a pd.Series of length m.

y: (optional) numpy array shape (n,1). The class labels for each case in X.

If return_X_y is False, y is appended to X.

ValueError if argument “numpy2d”/”numpyflat” is passed as return_type
Dimensionality: multivariate, 6
Series length: 100
Train cases: 40
Test cases: 40
Number of classes: 4
The data was generated as part of a student project where four students performed
four activities whilst wearing a smart watch. The watch collects 3D accelerometer
and a 3D gyroscope It consists of four classes, which are walking, resting,
running and badminton. Participants were required to record motion a total of
five times, and the data is sampled once every tenth of a second, for a ten second
Dataset details: http://www.timeseriesclassification.com/description.php?Dataset