Back to models
Classifier

MatrixProfileClassifier

Martrix Profile (MP) classifier.

This classifier simply transforms the input data using the MatrixProfile [1] transformer and builds a provided estimator using the transformed data.

Quickstart

python
from sktime.classification.feature_based import MatrixProfileClassifier

estimator = MatrixProfileClassifier(subsequence_length=10, estimator=None, n_jobs=1, random_state=None)

Parameters(4)

subsequence_lengthint, default=10
The subsequence length for the MatrixProfile transformer.
estimatorsklearn classifier, default=None
An sklearn estimator to be built using the transformed data. Defaults to a 1-nearest neighbour classifier.
n_jobsint, default=1

The number of jobs to run in parallel for both fit and predict. -1 means using all processors. Currently available for the classifier portion only.

random_stateint or None, default=None
Seed for random, integer.

Examples

>>> from sktime.classification.feature_based import MatrixProfileClassifier
>>> from sktime.datasets import load_unit_test
>>> X_train, y_train = load_unit_test (split = "train", return_X_y = True)
>>> X_test, y_test = load_unit_test (split = "test", return_X_y = True)
>>> clf = MatrixProfileClassifier ()
>>> clf. fit (X_train, y_train) MatrixProfileClassifier(
... )
>>> y_pred = clf. predict (X_test)

References

[1]

Yeh, Chin-Chia Michael, et al. “Time series joins, motifs, discords and shapelets: a unifying view that exploits the matrix profile.” Data Mining and Knowledge Discovery 32.1 (2018): 83-123. https://link.springer.com/article/10.1007/s10618-017-0519-9