load_gunpoint#

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

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

Parameters:
split: None or one of “TRAIN”, “TEST”, optional (default=None)

Whether to load the train or test instances of the problem. By default it loads both train and test instances (in a single container).

return_X_y: bool, optional (default=True)

If True, returns (features, target) separately instead of a single dataframe with columns for features and the target.

return_type: valid Panel mtype str or None, optional (default=None=”nested_univ”)

Memory data format specification to return X in, None = “nested_univ” type. str can be any supported sktime Panel mtype,

for list of mtypes, see datatypes.MTYPE_REGISTER for specifications, see examples/AA_datatypes_and_datasets.ipynb

commonly used specifications:

“nested_univ: nested pd.DataFrame, pd.Series in cells “numpy3D”/”numpy3d”/”np3D”: 3D np.ndarray (instance, variable, time index) “numpy2d”/”np2d”/”numpyflat”: 2D np.ndarray (instance, time index) “pd-multiindex”: pd.DataFrame with 2-level (instance, time) MultiIndex

Exception is raised if the data cannot be stored in the requested type.

Returns:
X: sktime data container, following mtype specification return_type

The time series data for the problem, with n instances

y: 1D numpy array of length n, only returned if return_X_y if True

The class labels for each time series instance in X If return_X_y is False, y is appended to X instead.

Notes

Dimensionality: univariate Series length: 150 Train cases: 50 Test cases: 150 Number of classes: 2

This dataset involves one female actor and one male actor making a motion with their hand. The two classes are: Gun-Draw and Point: For Gun-Draw the actors have their hands by their sides. They draw a replicate gun from a hip-mounted holster, point it at a target for approximately one second, then return the gun to the holster, and their hands to their sides. For Point the actors have their gun by their sides. They point with their index fingers to a target for approximately one second, and then return their hands to their sides. For both classes, we tracked the centroid of the actor’s right hands in both X- and Y-axes, which appear to be highly correlated. The data in the archive is just the X-axis.

Dataset details: http://timeseriesclassification.com/description.php ?Dataset=GunPoint

Examples

>>> from sktime.datasets import load_gunpoint
>>> X, y = load_gunpoint()