pub struct IncrementalPCA {
pub n_components: usize,
pub batch_size: Option<usize>,
pub whiten: bool,
/* private fields */
}Expand description
Incremental PCA - for large datasets that don’t fit in memory
Fields§
§n_components: usize§batch_size: Option<usize>§whiten: boolImplementations§
Source§impl IncrementalPCA
impl IncrementalPCA
pub fn new(n_components: usize) -> Self
pub fn batch_size(self, size: usize) -> Self
pub fn whiten(self, w: bool) -> Self
Sourcepub fn partial_fit(&mut self, x: &Tensor)
pub fn partial_fit(&mut self, x: &Tensor)
Partial fit on a batch of data
pub fn transform(&self, x: &Tensor) -> Tensor
pub fn fit_transform(&mut self, x: &Tensor) -> Tensor
pub fn inverse_transform(&self, x: &Tensor) -> Tensor
pub fn explained_variance_ratio(&self) -> Option<&Vec<f32>>
pub fn n_samples_seen(&self) -> usize
Auto Trait Implementations§
impl Freeze for IncrementalPCA
impl RefUnwindSafe for IncrementalPCA
impl Send for IncrementalPCA
impl Sync for IncrementalPCA
impl Unpin for IncrementalPCA
impl UnwindSafe for IncrementalPCA
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