Function: pca()
ts
function pca(
data,
n,
d,
k?): PcaResult;Defined in: ml/reduce.ts:44
Principal component analysis of a row-major n×d matrix, projected to k dims (default 2). Centers columns, forms the d×d covariance, then extracts the top-k eigenvectors by power iteration + deflation. Deterministic.
Parameters
| Parameter | Type | Default value |
|---|---|---|
data | ArrayLike<number> | undefined |
n | number | undefined |
d | number | undefined |
k | number | 2 |