Skip to main content

Module transform

Module transform 

Source
Expand description

Shapelet transform: turn a fitted ShapeletSet into an n×K distance feature matrix, for both training and out-of-sample curves.

Given K discovered shapelets and a curve set of n series, the transform produces an n×K FdMatrix whose entry X[(i, j)] is the shapelet distance (shapelet_distance) from shapelet j to curve i:

X[(i, j)] = sdist(shapelet_j, curve_i)

The K output columns are shapelet distances, not functional evaluation points. Downstream (Phase 60) an fdars classifier consumes this matrix as data — rows are observations, columns are the K shapelet-distance features.

§Consistency and normalization

The shapelets carried by a ShapeletSet are stored already z-normalized (Phase 57 provenance). The transform reuses those stored values directly and never re-normalizes against the input series’ statistics. Every window of each input series is z-normalized independently at comparison time inside shapelet_distance. Because training and out-of-sample curves flow through the identical code path with the identical stored shapelets and best_so_far = f64::INFINITY, re-transforming the training set exactly reproduces the fit-time distances (see ShapeletTransformFit).

Structs§

ShapeletTransformFit
A fitted shapelet transform: the discovered ShapeletSet plus the training feature matrix produced by applying it to the training curves.

Functions§

shapelet_transform
Apply a fitted ShapeletSet to a curve set, producing an n×K distance feature matrix.
shapelet_transform_fit
Fit a shapelet transform: discover shapelets from a labeled training set, then transform that training set into an n×K distance feature matrix.