Skip to content

recurrenceMatrix

recurrenceMatrix(data, options?): Float64Array<ArrayBufferLike>[]

Defined in: packages/pleco-xa/src/segment/index.js:222

Compute a recurrence (self-similarity) matrix from a feature matrix.

any[] | Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike>

features, shape (d, n) as a 2D matrix, or flat with explicit options.nFeatures/options.nFrames.

string | number

affinity bandwidth (positive scalar or ‘med_k_scalar’; other estimators throw).

boolean

full distance/affinity matrix.

number

neighbors per sample (default 2ceil(sqrt(t - 2width + 1))).

string

string

‘connectivity’ | ‘distance’ | ‘affinity’.

number

[options.nFrames] - shape for flat input.

boolean

populate the main diagonal.

boolean

keep only MUTUAL nearest neighbors.

number

|i - j| < width links are removed.

Float64Array<ArrayBufferLike>[]

rec - (t, t) matrix, rows are Float64Array. rec[i][j] non-zero means data[:, i] is a k-NN of data[:, j] (the transposed-graph orientation).