pub struct Pca { /* private fields */ }Expand description
PCA: finds orthogonal directions (principal components) of greatest variance and projects the
data onto the first components of them. Computed from the eigendecomposition of the
covariance matrix of the centred data. The leading components capture most of the structure in
correlated data, so a few of them often summarise many features.
Implementations§
Source§impl Pca
impl Pca
Sourcepub fn components(&self) -> &R2D
pub fn components(&self) -> &R2D
The principal axes, one per row.
Sourcepub fn explained_variance(&self) -> &[f64]
pub fn explained_variance(&self) -> &[f64]
The variance along each kept component.
Sourcepub fn explained_variance_ratio(&self) -> Vec<f64>
pub fn explained_variance_ratio(&self) -> Vec<f64>
The fraction of the total variance each kept component explains.
pub fn mean(&self) -> &R1D
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pca
impl RefUnwindSafe for Pca
impl Send for Pca
impl Sync for Pca
impl Unpin for Pca
impl UnsafeUnpin for Pca
impl UnwindSafe for Pca
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more