Classifier
IndividualTDE
Single TDE classifier, an extension of the Bag of SFA Symbols (BOSS) model.
Quickstart
python
from sktime.classification.dictionary_based import IndividualTDE
estimator = IndividualTDE(window_size=10, word_length=8, norm=False, levels=1, igb=False, alphabet_size=4, bigrams=True, dim_threshold=0.85, max_dims=20, typed_dict=True, n_jobs=1, random_state=None)Parameters(12)
- window_sizeint, default=10
- Size of the window to use in the SFA transform.
- word_lengthint, default=8
- Length of word to use to use in the SFA transform.
- normbool, default=False
- Whether to normalize SFA words by dropping the first Fourier coefficient.
- levelsint, default=1
- The number of spatial pyramid levels for the SFA transform.
- igbbool, default=False
- Whether to use Information Gain Binning (IGB) or Multiple Coefficient Binning (MCB) for the SFA transform.
- alphabet_sizedefault=4
- Number of possible letters (values) for each word.
- bigramsbool, default=False
- Whether to record word bigrams in the SFA transform.
- dim_thresholdfloat, default=0.85
- Accuracy threshold as a proportion of the highest accuracy dimension for words extracted from each dimensions. Only applicable for multivariate data.
- max_dimsint, default=20
- Maximum number of dimensions words are extracted from. Only applicable for multivariate data.
- typed_dictbool, default=True
- Use a numba TypedDict to store word counts. May increase memory usage, but will be faster for larger datasets.
- n_jobsint, default=1
The number of jobs to run in parallel for both
fitandpredict.-1means using all processors.- random_stateint or None, default=None
- Seed for random, integer.
Examples
>>> from sktime.classification.dictionary_based import IndividualTDE
>>> 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 = IndividualTDE ()
>>> clf. fit (X_train, y_train) IndividualTDE(
... )
>>> y_pred = clf. predict (X_test)References
- [1 ] Matthew Middlehurst, James Large, Gavin Cawley and Anthony Bagnall “The Temporal Dictionary Ensemble (TDE) Classifier for Time Series Classification”, in proceedings of the European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases, 2020.