pub struct EvolutionarySearchCV<E, S> { /* private fields */ }Expand description
Cross-validation wrapper for evolutionary search
Implementations§
Source§impl<E, S> EvolutionarySearchCV<E, S>where
E: Clone + Fit<ArrayBase<OwnedRepr<Float>, Dim<[usize; 2]>, Float>, ArrayBase<OwnedRepr<Float>, Dim<[usize; 1]>, Float>> + Predict<ArrayBase<OwnedRepr<Float>, Dim<[usize; 2]>, Float>, ArrayBase<OwnedRepr<Float>, Dim<[usize; 1]>, Float>>,
S: Fn(&E::Fitted, &ArrayBase<OwnedRepr<Float>, Dim<[usize; 2]>, Float>, &ArrayBase<OwnedRepr<Float>, Dim<[usize; 1]>, Float>) -> Result<f64>,
impl<E, S> EvolutionarySearchCV<E, S>where
E: Clone + Fit<ArrayBase<OwnedRepr<Float>, Dim<[usize; 2]>, Float>, ArrayBase<OwnedRepr<Float>, Dim<[usize; 1]>, Float>> + Predict<ArrayBase<OwnedRepr<Float>, Dim<[usize; 2]>, Float>, ArrayBase<OwnedRepr<Float>, Dim<[usize; 1]>, Float>>,
S: Fn(&E::Fitted, &ArrayBase<OwnedRepr<Float>, Dim<[usize; 2]>, Float>, &ArrayBase<OwnedRepr<Float>, Dim<[usize; 1]>, Float>) -> Result<f64>,
Sourcepub fn new(
estimator: E,
parameter_space: ParameterSpace,
scorer: Box<S>,
cv_folds: usize,
) -> Self
pub fn new( estimator: E, parameter_space: ParameterSpace, scorer: Box<S>, cv_folds: usize, ) -> Self
Create a new evolutionary search with cross-validation
Sourcepub fn set_population_size(&mut self, population_size: usize)
pub fn set_population_size(&mut self, population_size: usize)
Set population size
Sourcepub fn set_n_generations(&mut self, n_generations: usize)
pub fn set_n_generations(&mut self, n_generations: usize)
Set number of generations
Sourcepub fn set_random_state(&mut self, seed: u64)
pub fn set_random_state(&mut self, seed: u64)
Set random state for reproducibility
Sourcepub fn set_crossover_rate(&mut self, rate: f64)
pub fn set_crossover_rate(&mut self, rate: f64)
Set crossover rate
Sourcepub fn set_mutation_rate(&mut self, rate: f64)
pub fn set_mutation_rate(&mut self, rate: f64)
Set mutation rate
Trait Implementations§
Source§impl<E: Clone, S: Clone> Clone for EvolutionarySearchCV<E, S>
impl<E: Clone, S: Clone> Clone for EvolutionarySearchCV<E, S>
Source§fn clone(&self) -> EvolutionarySearchCV<E, S>
fn clone(&self) -> EvolutionarySearchCV<E, S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<E, S> Freeze for EvolutionarySearchCV<E, S>where
E: Freeze,
impl<E, S> RefUnwindSafe for EvolutionarySearchCV<E, S>where
E: RefUnwindSafe,
S: RefUnwindSafe,
impl<E, S> Send for EvolutionarySearchCV<E, S>
impl<E, S> Sync for EvolutionarySearchCV<E, S>
impl<E, S> Unpin for EvolutionarySearchCV<E, S>where
E: Unpin,
impl<E, S> UnsafeUnpin for EvolutionarySearchCV<E, S>where
E: UnsafeUnpin,
impl<E, S> UnwindSafe for EvolutionarySearchCV<E, S>where
E: UnwindSafe,
S: UnwindSafe,
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