pub struct UMDABuilder<G, F, Fit, Term>where
G: EvolutionaryGenome,
F: FitnessValue,{ /* private fields */ }Expand description
Builder for UMDA
Implementations§
Source§impl<G, F> UMDABuilder<G, F, (), ()>where
G: EvolutionaryGenome,
F: FitnessValue,
impl<G, F> UMDABuilder<G, F, (), ()>where
G: EvolutionaryGenome,
F: FitnessValue,
Source§impl<G, F, Fit, Term> UMDABuilder<G, F, Fit, Term>where
G: EvolutionaryGenome,
F: FitnessValue,
impl<G, F, Fit, Term> UMDABuilder<G, F, Fit, Term>where
G: EvolutionaryGenome,
F: FitnessValue,
Sourcepub fn population_size(self, size: usize) -> Self
pub fn population_size(self, size: usize) -> Self
Set the population size
Sourcepub fn selection_ratio(self, ratio: f64) -> Self
pub fn selection_ratio(self, ratio: f64) -> Self
Set the selection ratio
Sourcepub fn min_variance(self, variance: f64) -> Self
pub fn min_variance(self, variance: f64) -> Self
Set the minimum variance
Sourcepub fn prob_bounds(self, min: f64, max: f64) -> Self
pub fn prob_bounds(self, min: f64, max: f64) -> Self
Set probability bounds for binary UMDA
Sourcepub fn learning_rate(self, rate: f64) -> Self
pub fn learning_rate(self, rate: f64) -> Self
Set the learning rate for model update
Sourcepub fn bounds(self, bounds: MultiBounds) -> Self
pub fn bounds(self, bounds: MultiBounds) -> Self
Set the search space bounds
Sourcepub fn fitness<NewFit>(self, fitness: NewFit) -> UMDABuilder<G, F, NewFit, Term>where
NewFit: Fitness<Genome = G, Value = F>,
pub fn fitness<NewFit>(self, fitness: NewFit) -> UMDABuilder<G, F, NewFit, Term>where
NewFit: Fitness<Genome = G, Value = F>,
Set the fitness function
Sourcepub fn termination<NewTerm>(
self,
termination: NewTerm,
) -> UMDABuilder<G, F, Fit, NewTerm>where
NewTerm: TerminationCriterion<G, F>,
pub fn termination<NewTerm>(
self,
termination: NewTerm,
) -> UMDABuilder<G, F, Fit, NewTerm>where
NewTerm: TerminationCriterion<G, F>,
Set the termination criterion
Sourcepub fn max_generations(
self,
max: usize,
) -> UMDABuilder<G, F, Fit, MaxGenerations>
pub fn max_generations( self, max: usize, ) -> UMDABuilder<G, F, Fit, MaxGenerations>
Set max generations (convenience method)
Source§impl<F, Fit, Term> UMDABuilder<RealVector, F, Fit, Term>where
F: FitnessValue + Send,
Fit: Fitness<Genome = RealVector, Value = F> + Sync,
Term: TerminationCriterion<RealVector, F>,
impl<F, Fit, Term> UMDABuilder<RealVector, F, Fit, Term>where
F: FitnessValue + Send,
Fit: Fitness<Genome = RealVector, Value = F> + Sync,
Term: TerminationCriterion<RealVector, F>,
Sourcepub fn build(self) -> Result<ContinuousUMDA<F, Fit, Term>, EvolutionError>
pub fn build(self) -> Result<ContinuousUMDA<F, Fit, Term>, EvolutionError>
Build the continuous UMDA instance
Source§impl<F, Fit, Term> UMDABuilder<BitString, F, Fit, Term>where
F: FitnessValue + Send,
Fit: Fitness<Genome = BitString, Value = F> + Sync,
Term: TerminationCriterion<BitString, F>,
impl<F, Fit, Term> UMDABuilder<BitString, F, Fit, Term>where
F: FitnessValue + Send,
Fit: Fitness<Genome = BitString, Value = F> + Sync,
Term: TerminationCriterion<BitString, F>,
Sourcepub fn build(self) -> Result<BinaryUMDA<F, Fit, Term>, EvolutionError>
pub fn build(self) -> Result<BinaryUMDA<F, Fit, Term>, EvolutionError>
Build the binary UMDA instance
Trait Implementations§
Source§impl<G, F> Default for UMDABuilder<G, F, (), ()>where
G: EvolutionaryGenome,
F: FitnessValue,
impl<G, F> Default for UMDABuilder<G, F, (), ()>where
G: EvolutionaryGenome,
F: FitnessValue,
Auto Trait Implementations§
impl<G, F, Fit, Term> Freeze for UMDABuilder<G, F, Fit, Term>
impl<G, F, Fit, Term> RefUnwindSafe for UMDABuilder<G, F, Fit, Term>
impl<G, F, Fit, Term> Send for UMDABuilder<G, F, Fit, Term>
impl<G, F, Fit, Term> Sync for UMDABuilder<G, F, Fit, Term>
impl<G, F, Fit, Term> Unpin for UMDABuilder<G, F, Fit, Term>
impl<G, F, Fit, Term> UnsafeUnpin for UMDABuilder<G, F, Fit, Term>where
Fit: UnsafeUnpin,
Term: UnsafeUnpin,
impl<G, F, Fit, Term> UnwindSafe for UMDABuilder<G, F, Fit, Term>
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> 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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.