pub enum SelectionStrategy {
Sequential,
UncertaintySampling {
uncertainty_weight: f64,
},
ExpectedInformationGain {
temperature: f64,
},
CoverageAware {
min_evaluations: usize,
exploration_bonus: f64,
},
}Expand description
Active learning selection strategy
Variants§
Sequential
Sequential selection (current default behavior)
Selects candidates in order of their index, cycling through the population. Simple but not optimal for learning.
UncertaintySampling
Uncertainty sampling
Prioritizes candidates with the highest uncertainty (variance) in their fitness estimates. This helps reduce overall uncertainty in the ranking.
Fields
ExpectedInformationGain
Expected information gain (for pairwise comparisons)
Selects pairs of candidates where the comparison result is most uncertain (probability close to 0.5). This maximizes the expected reduction in entropy.
Fields
CoverageAware
Coverage-aware selection
Ensures minimum coverage before exploring uncertain candidates. Good for balancing exploration with ensuring all candidates are evaluated at least some minimum number of times.
Implementations§
Source§impl SelectionStrategy
impl SelectionStrategy
Sourcepub fn uncertainty_sampling(uncertainty_weight: f64) -> Self
pub fn uncertainty_sampling(uncertainty_weight: f64) -> Self
Create uncertainty sampling strategy
Sourcepub fn information_gain(temperature: f64) -> Self
pub fn information_gain(temperature: f64) -> Self
Create expected information gain strategy
Sourcepub fn coverage_aware(min_evaluations: usize, exploration_bonus: f64) -> Self
pub fn coverage_aware(min_evaluations: usize, exploration_bonus: f64) -> Self
Create coverage-aware strategy
Sourcepub fn select_batch<G, R>(
&self,
candidates: &[Candidate<G>],
aggregator: &FitnessAggregator,
batch_size: usize,
rng: &mut R,
) -> Vec<usize>where
G: EvolutionaryGenome,
R: Rng,
pub fn select_batch<G, R>(
&self,
candidates: &[Candidate<G>],
aggregator: &FitnessAggregator,
batch_size: usize,
rng: &mut R,
) -> Vec<usize>where
G: EvolutionaryGenome,
R: Rng,
Sourcepub fn select_pair<G, R>(
&self,
candidates: &[Candidate<G>],
aggregator: &FitnessAggregator,
rng: &mut R,
) -> Option<(usize, usize)>where
G: EvolutionaryGenome,
R: Rng,
pub fn select_pair<G, R>(
&self,
candidates: &[Candidate<G>],
aggregator: &FitnessAggregator,
rng: &mut R,
) -> Option<(usize, usize)>where
G: EvolutionaryGenome,
R: Rng,
Trait Implementations§
Source§impl Clone for SelectionStrategy
impl Clone for SelectionStrategy
Source§fn clone(&self) -> SelectionStrategy
fn clone(&self) -> SelectionStrategy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SelectionStrategy
impl Debug for SelectionStrategy
Source§impl Default for SelectionStrategy
impl Default for SelectionStrategy
Source§impl<'de> Deserialize<'de> for SelectionStrategy
impl<'de> Deserialize<'de> for SelectionStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SelectionStrategy
impl RefUnwindSafe for SelectionStrategy
impl Send for SelectionStrategy
impl Sync for SelectionStrategy
impl Unpin for SelectionStrategy
impl UnsafeUnpin for SelectionStrategy
impl UnwindSafe for SelectionStrategy
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
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>
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>
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>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.