dtw
dtw(
X?,Y?,options?):object
Defined in: packages/pleco-xa/src/sequence/dtw.js:182
Dynamic time warping between two feature sequences (or a precomputed cost matrix).
Parameters
Section titled “Parameters”(number[] | Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike>)[] = null
Feature matrix, shape (d, N) — rows are features, columns are frames.
Pass null when supplying options.C.
(number[] | Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike>)[] = null
Feature matrix, shape (d, M). Pass null when supplying options.C.
options?
Section titled “options?”backtrack?
Section titled “backtrack?”boolean
also return the warping path.
bandRad?
Section titled “bandRad?”number
band radius as a fraction of min(N, M).
number[][]
precomputed cost matrix (N, M). Mutually exclusive with X/Y.
globalConstraints?
Section titled “globalConstraints?”boolean
Sakoe-Chiba band.
metric?
Section titled “metric?”string
returnSteps?
Section titled “returnSteps?”boolean
also return the step matrix.
stepSizesSigma?
Section titled “stepSizesSigma?”number[][]
custom steps, APPENDED to the defaults.
subseq?
Section titled “subseq?”boolean
subsequence DTW.
weightsAdd?
Section titled “weightsAdd?”number[]
additive step weights.
weightsMul?
Section titled “weightsMul?”number[]
multiplicative step weights.
Returns
Section titled “Returns”object
D is the (N, M) accumulated cost matrix (D[N-1][M-1] is the total
alignment cost). wp (when backtrack) is the warping path from the end
of the alignment down to its start.
D:
Float64Array<ArrayBufferLike>[]
steps?
Section titled “steps?”
optionalsteps?:Int32Array<ArrayBufferLike>[]
optionalwp?:number[][]