pub struct EnhancedPCA<F> {
pub algorithm: PCAAlgorithm,
pub config: PCAConfig,
pub results: Option<PCAResult<F>>,
/* private fields */
}Expand description
Enhanced Principal Component Analysis with multiple algorithms
Fields§
§algorithm: PCAAlgorithmAlgorithm to use
config: PCAConfigConfiguration
results: Option<PCAResult<F>>Fitted results
Implementations§
Source§impl<F> EnhancedPCA<F>where
F: Float + Zero + One + Copy + Send + Sync + SimdUnifiedOps + FromPrimitive + Display + Sum + ScalarOperand,
impl<F> EnhancedPCA<F>where
F: Float + Zero + One + Copy + Send + Sync + SimdUnifiedOps + FromPrimitive + Display + Sum + ScalarOperand,
Sourcepub fn new(algorithm: PCAAlgorithm, config: PCAConfig) -> Self
pub fn new(algorithm: PCAAlgorithm, config: PCAConfig) -> Self
Create new enhanced PCA analyzer
Sourcepub fn fit(&mut self, data: &ArrayView2<'_, F>) -> StatsResult<&PCAResult<F>>
pub fn fit(&mut self, data: &ArrayView2<'_, F>) -> StatsResult<&PCAResult<F>>
Fit PCA to data
Sourcepub fn transform(&self, data: &ArrayView2<'_, F>) -> StatsResult<Array2<F>>
pub fn transform(&self, data: &ArrayView2<'_, F>) -> StatsResult<Array2<F>>
Transform data to principal component space
Sourcepub fn fit_transform(
&mut self,
data: &ArrayView2<'_, F>,
) -> StatsResult<Array2<F>>
pub fn fit_transform( &mut self, data: &ArrayView2<'_, F>, ) -> StatsResult<Array2<F>>
Fit and transform in one step
Sourcepub fn inverse_transform(
&self,
transformeddata: &ArrayView2<'_, F>,
) -> StatsResult<Array2<F>>
pub fn inverse_transform( &self, transformeddata: &ArrayView2<'_, F>, ) -> StatsResult<Array2<F>>
Inverse transform from principal component space
Sourcepub fn explained_variance_ratio(&self) -> Option<&Array1<F>>
pub fn explained_variance_ratio(&self) -> Option<&Array1<F>>
Get explained variance ratio for each component
Sourcepub fn cumulative_variance_ratio(&self) -> Option<&Array1<F>>
pub fn cumulative_variance_ratio(&self) -> Option<&Array1<F>>
Get cumulative explained variance ratio
Sourcepub fn components(&self) -> Option<&Array2<F>>
pub fn components(&self) -> Option<&Array2<F>>
Get principal components
Auto Trait Implementations§
impl<F> Freeze for EnhancedPCA<F>where
F: Freeze,
impl<F> RefUnwindSafe for EnhancedPCA<F>where
F: RefUnwindSafe,
impl<F> Send for EnhancedPCA<F>where
F: Send,
impl<F> Sync for EnhancedPCA<F>where
F: Sync,
impl<F> Unpin for EnhancedPCA<F>where
F: Unpin,
impl<F> UnsafeUnpin for EnhancedPCA<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for EnhancedPCA<F>where
F: UnwindSafe + RefUnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.