pub struct StreamingPCA { /* private fields */ }Expand description
Streaming PCA for real-time dimensionality reduction
Implementations§
Source§impl StreamingPCA
impl StreamingPCA
Sourcepub fn with_config(self, config: StreamingConfig) -> Self
pub fn with_config(self, config: StreamingConfig) -> Self
Configure the streaming PCA
Sourcepub fn partial_fit(&mut self, sample: &Array1<Float>) -> Result<()>
pub fn partial_fit(&mut self, sample: &Array1<Float>) -> Result<()>
Update the PCA with a new data sample
Sourcepub fn transform(&self, x: &Array2<Float>) -> Result<Array2<Float>>
pub fn transform(&self, x: &Array2<Float>) -> Result<Array2<Float>>
Transform new data using current components
Sourcepub fn components(&self) -> Option<&Array2<Float>>
pub fn components(&self) -> Option<&Array2<Float>>
Get the current components
Sourcepub fn explained_variance(&self) -> Option<&Array1<Float>>
pub fn explained_variance(&self) -> Option<&Array1<Float>>
Get the explained variance
Sourcepub fn is_drift_detected(&self) -> bool
pub fn is_drift_detected(&self) -> bool
Check if concept drift was detected
Sourcepub fn n_samples_seen(&self) -> usize
pub fn n_samples_seen(&self) -> usize
Get number of samples seen
Sourcepub fn force_update(&mut self) -> Result<()>
pub fn force_update(&mut self) -> Result<()>
Force an immediate update of the decomposition (useful for real-time scenarios)
Trait Implementations§
Source§impl Clone for StreamingPCA
impl Clone for StreamingPCA
Auto Trait Implementations§
impl Freeze for StreamingPCA
impl RefUnwindSafe for StreamingPCA
impl Send for StreamingPCA
impl Sync for StreamingPCA
impl Unpin for StreamingPCA
impl UnsafeUnpin for StreamingPCA
impl UnwindSafe for StreamingPCA
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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