#[non_exhaustive]pub enum NcompMethod {
CumulativeVariance(f64),
Elbow,
Fixed(usize),
Kaiser,
}Expand description
Method for selecting the number of principal components.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CumulativeVariance(f64)
Retain components until cumulative variance >= threshold.
Threshold 0.95 retains 95% of variance, which is a widely-used default (Jackson, 1991). For monitoring applications, 0.90 may suffice as the remaining variance contributes to SPE rather than T-squared.
Elbow
Detect the elbow (max second finite difference) in the scree plot (Cattell, 1966, p. 252).
The elbow method is sensitive to noise in the eigenvalue spectrum.
Second finite differences amplify noise by a factor of ~3 (condition
number of the differencing operator). The 3-point moving average
pre-smoothing reduces the effective amplification to ~1.5.
Falls back to CumulativeVariance(0.95) when fewer than 3 eigenvalues
are available.
Fixed(usize)
Use a fixed number of components.
Kaiser
Retain eigenvalues above the mean (Kaiser criterion variant; Kaiser, 1960, pp. 145–146).
The Kaiser criterion tends to over-extract when variables are many and under-extract when few. It is equivalent to retaining components with above-average explanatory power.
Trait Implementations§
Source§impl Clone for NcompMethod
impl Clone for NcompMethod
Source§fn clone(&self) -> NcompMethod
fn clone(&self) -> NcompMethod
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NcompMethod
impl Debug for NcompMethod
Source§impl PartialEq for NcompMethod
impl PartialEq for NcompMethod
impl StructuralPartialEq for NcompMethod
Auto Trait Implementations§
impl Freeze for NcompMethod
impl RefUnwindSafe for NcompMethod
impl Send for NcompMethod
impl Sync for NcompMethod
impl Unpin for NcompMethod
impl UnsafeUnpin for NcompMethod
impl UnwindSafe for NcompMethod
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
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>
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>
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
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.