pub struct PCA {
pub n_components: usize,
pub whiten: bool,
pub components_: Option<Vec<Vec<f32>>>,
pub explained_variance_: Option<Vec<f32>>,
pub explained_variance_ratio_: Option<Vec<f32>>,
pub mean_: Option<Vec<f32>>,
pub n_features_: usize,
pub n_samples_: usize,
}Expand description
Principal Component Analysis using power iteration for eigendecomposition
Fields§
§n_components: usize§whiten: bool§components_: Option<Vec<Vec<f32>>>§explained_variance_: Option<Vec<f32>>§explained_variance_ratio_: Option<Vec<f32>>§mean_: Option<Vec<f32>>§n_features_: usize§n_samples_: usizeImplementations§
Source§impl PCA
impl PCA
pub fn new(n_components: usize) -> Self
pub fn whiten(self, whiten: bool) -> Self
pub fn fit(&mut self, x: &Tensor)
pub fn transform(&self, x: &Tensor) -> Tensor
pub fn fit_transform(&mut self, x: &Tensor) -> Tensor
pub fn inverse_transform(&self, x: &Tensor) -> Tensor
Auto Trait Implementations§
impl Freeze for PCA
impl RefUnwindSafe for PCA
impl Send for PCA
impl Sync for PCA
impl Unpin 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more