Skip to main content

Module classifier

Module classifier 

Source
Expand description

Bundled shapelet-transform classifier: discover → transform → classify.

This is the end-to-end pipeline matching sktime’s ShapeletTransformClassifier. shapelet_classifier_fit discovers a ShapeletSet from labeled training curves (Phase 58), transforms the training set into an n×K shapelet-distance feature matrix (Phase 59), and fits an existing fdars classifier on those features (k-NN by default, LDA optionally). ShapeletClassifierFit::predict transforms new curves through the identical stored shapelets and classifies them with the stored inner model — no re-discovery, no re-normalization.

§Divergence from the inner classifier’s usual input

The inner classifiers (fclassif_knn_fit, fclassif_lda_fit) run FPCA on their data argument. Here data is the n×K shapelet-distance matrix, not functional evaluation points — so the inner FPCA is applied to distance features rather than curves. With the default ncomp = None we use ncomp = K (full rank, clamped to min(K, n-1)), so the FPCA rotation is a full-rank orthonormal change of basis that preserves all feature information; the k-NN / LDA decision then operates on an information-preserving rotation of the raw shapelet-distance features. sktime uses a RotationForest on the transformed features; fdars deliberately reuses its existing k-NN / LDA machinery instead.

§Train/test discipline

Shapelet quality is computed on the training split only (correct by the Hills/Lines design). Never pass test data into shapelet_classifier_fit, and never report ShapeletClassifierFit::train_accuracy as a generalization estimate — evaluate on a held-out split via ShapeletClassifierFit::predict.

Structs§

ShapeletClassifierConfig
Configuration for shapelet_classifier_fit.
ShapeletClassifierFit
A fitted shapelet-transform classifier: the discovered shapelet transform plus the inner classifier trained on the n×K distance features.

Enums§

ShapeletClassifier
The inner classifier the shapelet-transform pipeline trains on the n×K distance-feature matrix.

Functions§

shapelet_classifier_fit
Fit a bundled shapelet-transform classifier: discover shapelets, transform the training curves to an n×K distance-feature matrix, and train an inner fdars classifier (k-NN default, LDA optional) on those features.