pub struct PCAConfig {
pub n_components: Option<usize>,
pub center: bool,
pub solver: PcaSolver,
pub random_state: Option<u64>,
pub tolerance: f64,
pub max_iterations: usize,
}Expand description
Configuration for Principal Component Analysis
Fields§
§n_components: Option<usize>Number of components to keep
center: boolWhether to center the data (subtract mean)
solver: PcaSolverSolver algorithm for eigendecomposition
random_state: Option<u64>Random state for reproducible results
tolerance: f64Tolerance for convergence in iterative solvers
max_iterations: usizeMaximum number of iterations for iterative solvers
Implementations§
Source§impl PCAConfig
impl PCAConfig
Sourcepub fn new(n_components: usize) -> Self
pub fn new(n_components: usize) -> Self
Create a new PCA configuration with specified number of components
Sourcepub fn with_solver(self, solver: PcaSolver) -> Self
pub fn with_solver(self, solver: PcaSolver) -> Self
Set the solver algorithm
Sourcepub fn with_center(self, center: bool) -> Self
pub fn with_center(self, center: bool) -> Self
Enable or disable data centering
Sourcepub fn with_random_state(self, random_state: u64) -> Self
pub fn with_random_state(self, random_state: u64) -> Self
Set random state for reproducible results
Sourcepub fn with_tolerance(self, tolerance: f64) -> Self
pub fn with_tolerance(self, tolerance: f64) -> Self
Set convergence tolerance
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PCAConfig
impl RefUnwindSafe for PCAConfig
impl Send for PCAConfig
impl Sync for PCAConfig
impl Unpin for PCAConfig
impl UnwindSafe for PCAConfig
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> 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