Back to models
Transformer (Pairwise Panel)

CtwDistTslearn

Canonical time warping distance, from tslearn.

Quickstart

python
from sktime.dists_kernels.ctw import CtwDistTslearn

estimator = CtwDistTslearn(max_iter=100, n_components=None, global_constraint=None, sakoe_chiba_radius=None, itakura_max_slope=None, n_jobs=None, verbose=0)

Parameters(6)

max_iterint (default: 100)
Number of iterations for the CTW algorithm.
n_componentsint (default: None)
Number of components to be used for Canonical Correlation Analysis. If None, the minimum number of features of inputs is used.
global_constraint{“itakura”, “sakoe_chiba”} or None (default: None)
Global constraint to restrict admissible paths for DTW.
sakoe_chiba_radiusint or None (default: None)

Radius to be used for Sakoe-Chiba band global constraint. If None and global_constraint is set to "sakoe_chiba", a radius of 1 is used. If both sakoe_chiba_radius and itakura_max_slope are set, global_constraint is used to infer which constraint to use among the two. In this case, if global_constraint corresponds to no global constraint, a RuntimeWarning is raised and no global constraint is used.

itakura_max_slopefloat or None (default: None)

Maximum slope for the Itakura parallelogram constraint. If None and global_constraint is set to "itakura", a maximum slope of 2 is used. If both sakoe_chiba_radius and itakura_max_slope are set, global_constraint is used to infer which constraint to use among the two. In this case, if global_constraint corresponds to no global constraint, a RuntimeWarning is raised and no global constraint is used.

verboseint, optional (default=0)
The verbosity level: if non zero, progress messages are printed. Above 50, the output is sent to stdout. The frequency of the messages increases with the verbosity level. If it more than 10, all iterations are reported.

References

  1. [1 ] F. Zhou and F. Torre, “Canonical time warping for alignment of human behavior”. NIPS 2009.