MatrixProfileClassifierSKTimeWrapper
Python template · sinapsis_sktime.templates.sktime_classifiers
Overview
Template for SkTime classification model training and inference for the feature_based module.
MatrixProfileClassifier — inherited documentation
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.
Parameters ---------- subsequence_length : int, default=10 The subsequence length for the MatrixProfile transformer. estimator : sklearn classifier, default=None An sklearn estimator to be built using the transformed data. Defaults to a 1-nearest neighbour classifier. n_jobs : int, 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_state : int or None, default=None Seed for random, integer.
Attributes ---------- n_classes_ : int Number of classes. Extracted from the data. classes_ : ndarray of shape (n_classes_) Holds the label for each class.
See Also -------- MatrixProfile
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
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) # doctest: +SKIP >>> clf = MatrixProfileClassifier() # doctest: +SKIP >>> clf.fit(X_train, y_train) # doctest: +SKIP MatrixProfileClassifier(...) # doctest: +SKIP >>> y_pred = clf.predict(X_test) # doctest: +SKIP
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
pip install sinapsis-sktime==1.0.0uv pip install sinapsis-sktime==1.0.0uv add sinapsis-sktime==1.0.0Configuration
Effective fields from the inspector schema, including nested Pydantic model fields.
Optional
Default: null
Optional
Default: "/sinapsis-hub/private/platform/sinapsis-hub/playground/publish"
Path where the trained model will be saved. matrixprofileclassifier_init subsequence_length <class 'int'>: default: 10 estimator <class 'NoneType'>: default: None n_jobs <class 'int'>: default: 1 random_state typing.Optional[int]: default: None
Required
Default: null
Required
Default: null
Optional
Default: 1
Optional
Default: null
Optional
Default: null
Optional
Default: 10
Configuration example
Generated from documented defaults. Replace any placeholders and complete required nested settings before running.
templates:
- template_name: "MatrixProfileClassifierSKTimeWrapper"
class_name: "MatrixProfileClassifierSKTimeWrapper"
attributes:
root_dir: "/sinapsis-hub/private/platform/sinapsis-hub/playground/publish"
model_save_path: "<required>"
matrixprofileclassifier_init:
n_jobs: 1
estimator: null
random_state: null
subsequence_length: 10
Inheritance
sinapsis_sktime.templates.sktime_classifiers.SKTimeFeatureClassifiersEnvironment variables
Environment definitions belong to their canonical Python modules.