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.
Parameters
Section titled “Parameters”any[] | Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike>
features, shape (d, n) as a
2D matrix, or flat with explicit options.nFeatures/options.nFrames.
options?
Section titled “options?”bandwidth?
Section titled “bandwidth?”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))).
metric?
Section titled “metric?”string
string
‘connectivity’ | ‘distance’ | ‘affinity’.
nFeatures?
Section titled “nFeatures?”number
[options.nFrames] - shape for flat input.
boolean
populate the main diagonal.
boolean
keep only MUTUAL nearest neighbors.
width?
Section titled “width?”number
|i - j| < width links are removed.
Returns
Section titled “Returns”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).