pub struct PcaResult {
pub components: Vec<Vec<f64>>,
pub explained_variance: Vec<f64>,
pub explained_variance_ratio: Vec<f64>,
pub mean: Vec<f64>,
pub std_dev: Vec<f64>,
pub n_samples: usize,
pub n_features: usize,
pub iterations_used: usize,
}Expand description
PCA result containing components and explained variance
Fields§
§components: Vec<Vec<f64>>Principal component vectors (n_components x n_features), row-major
explained_variance: Vec<f64>Variance explained by each component (eigenvalues)
explained_variance_ratio: Vec<f64>Proportion of total variance explained by each component
mean: Vec<f64>Feature means used for centering (needed to project new data)
std_dev: Vec<f64>Feature standard deviations (if scaling was used)
n_samples: usizeNumber of samples in the input data
n_features: usizeNumber of features in the input data
iterations_used: usizeNumber of iterations used (last component for PowerIteration, power iters for Randomized)
Implementations§
Auto Trait Implementations§
impl Freeze for PcaResult
impl RefUnwindSafe for PcaResult
impl Send for PcaResult
impl Sync for PcaResult
impl Unpin for PcaResult
impl UnsafeUnpin for PcaResult
impl UnwindSafe for PcaResult
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> 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> 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 more