Skip to main content

fit

Function fit 

Source
pub fn fit(x: &[f64], n: usize, p: usize) -> Result<Pca, LearningError>
Expand description

Fit PCA to a row-major n × p matrix. None-equivalent failures are returned as LearningError (fail closed): InvalidDimension, InsufficientData (n < 2), or Singular if the eigensolver cannot decompose the covariance.