pub struct CrossValidationSelector { /* private fields */ }Expand description
Cross-validation based component selection
Implementations§
Source§impl CrossValidationSelector
impl CrossValidationSelector
Sourcepub fn new(method: CrossValidationMethod) -> Self
pub fn new(method: CrossValidationMethod) -> Self
Create a new cross-validation selector
Sourcepub fn config(self, config: ComponentSelectionConfig) -> Self
pub fn config(self, config: ComponentSelectionConfig) -> Self
Set configuration
Sourcepub fn max_components(self, max_components: usize) -> Self
pub fn max_components(self, max_components: usize) -> Self
Set maximum components to test
Sourcepub fn random_state(self, random_state: u64) -> Self
pub fn random_state(self, random_state: u64) -> Self
Set random state
Sourcepub fn select_pca_components(
&self,
data: &Array2<Float>,
) -> Result<ComponentSelectionResult>
pub fn select_pca_components( &self, data: &Array2<Float>, ) -> Result<ComponentSelectionResult>
Select optimal number of components for PCA using cross-validation
Auto Trait Implementations§
impl Freeze for CrossValidationSelector
impl RefUnwindSafe for CrossValidationSelector
impl Send for CrossValidationSelector
impl Sync for CrossValidationSelector
impl Unpin for CrossValidationSelector
impl UnsafeUnpin for CrossValidationSelector
impl UnwindSafe for CrossValidationSelector
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> 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