Classifier
Catch22Classifier
Canonical Time-series Characteristics (catch22) classifier.
Quickstart
python
from sktime.classification.feature_based import Catch22Classifier
estimator = Catch22Classifier(outlier_norm=False, replace_nans=True, estimator=None, n_jobs=1, random_state=None)Parameters(5)
- outlier_normbool, optional, default=False
- Normalise each series during the two outlier Catch22 features, which can take a while to process for large values.
- replace_nansbool, optional, default=True
- Replace NaN or inf values from the Catch22 transform with 0.
- estimatorsklearn classifier, optional, default=None
- An sklearn estimator to be built using the transformed data. Defaults to sklearn RandomForestClassifier(n_estimators=200)
- n_jobsint, optional, default=1
The number of jobs to run in parallel for both
fitandpredict.-1means using all processors.- random_stateint or None, optional, default=None
- Seed for random, integer.
Examples
>>> from sktime.classification.feature_based import Catch22Classifier
>>> from sklearn.ensemble import RandomForestClassifier
>>> 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 = Catch22Classifier (
... estimator = RandomForestClassifier (n_estimators = 5),
... outlier_norm = True,
... )
>>> clf. fit (X_train, y_train) Catch22Classifier(
... )
>>> y_pred = clf. predict (X_test)References
- [1 ] Lubba, Carl H., et al. “catch22: Canonical time-series characteristics.” Data Mining and Knowledge Discovery 33.6 (2019): 1821-1852. https://link.springer.com/article/10.1007/s10618-019-00647-x