Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

CanonicalWarpingCorrespondence

CanonicalWarpingCorrespondence[s1,s2]
gives the canonical time warping (CTW) correspondence between sequences s1 and s2.

CanonicalWarpingCorrespondence[s1,s2,warp]
uses warp as initial warping correspondence.

CanonicalWarpingCorrespondence[s1,s2,warp,win]
uses a window win for local search.

Details and OptionsDetails and Options

  • Canonical time warping (CTW) iteratively performs spatial transformations and dynamic time warping on the reference sequence s1 and the query sequence s2 to find the alignment with minimal distance between sequences.
  • The sequences si can be lists of numeric scalars or vectors. In contrast to dynamic time warping, elements of s1 and s2 can be of different dimensions.
  • CanonicalWarpingCorrespondence returns {{n1,,nk},{m1,,mk}} of non-decreasing positions such that s1ni correspond to s2mi.
  • Corresponding positions attempt to minimize the distance over all possible such positions and with the constraint that all elements of s1 and s2 are represented as some s1ni and s2mj, respectively.
  • Spatial transformation matrices α and β are computed in each iteration using canonical correlation analysis.
  • Compute the effective distance using CanonicalWarpingDistance.
  • Possible settings for the search window win are:
  • Automatica full search
    ra slanted band window of radius
    {"SlantedBand",r}a slanted band window of radius
    {"Band",r}band window of radius (SakoeChiba)
    {"Parallelogram",a}parallelogram window placed at origin with slopes and (Itakura)
  • The following options are supported:
  • DistanceFunctionAutomaticdistance function used in dynamic time warping
    MaxIterationsAutomaticmaximal number of iterations
    MethodAutomaticadditional parameters
  • The following options are available through Method->opts:
  • "DimensionsToKeep"Automaticdimensions after projection
    "EnergyThreshold"Automaticfraction of "energy" to be kept
    "Lambdas"Automaticregularization values
    "MatchingIntervals"Automaticwhether to match the query to the full reference or part of the reference
  • Possible settings for the "MatchingIntervals" option include:
  • Automatica full match
    "Flexible"flexible at both ends
    "FlexibleEnd"flexible only at the end of the interval

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Find the canonical time warping correspondence between two scalar sequences:

In[2]:=
Click for copyable input
Out[2]=

Find the canonical time warping correspondence between a 3D path and a 2D line segment:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2016
(11.0)