pub fn pca_init(
data: &[f32],
n: usize,
d: usize,
) -> Result<Vec<[f32; 2]>, PaCMAPError>Expand description
Project n × d row-major data onto its top 2 principal components.
Returns n (PC1, PC2) score pairs.
§Errors
Returns PaCMAPError::Pca if the decomposition fails or the inputs are
inconsistent.