pub struct InformationGain;Expand description
Highest information gain first.
Trait Implementations§
Source§impl Default for InformationGain
impl Default for InformationGain
Source§fn default() -> InformationGain
fn default() -> InformationGain
Returns the “default value” for a type. Read more
Source§impl Heuristic for InformationGain
impl Heuristic for InformationGain
Source§fn compute(&self, cover: &mut Cover, candidates: &mut Vec<usize>) -> Vec<f64>
fn compute(&self, cover: &mut Cover, candidates: &mut Vec<usize>) -> Vec<f64>
Sorts
candidates best first and returns their scores in the same
order (empty when the heuristic does not score).Source§fn compute_with_scorer(
&self,
parent_entropy: f64,
cover: &mut Cover,
candidates: &mut Vec<usize>,
scorer: Box<dyn Fn(&[usize], &[usize], &[usize], f64) -> f64>,
lower_is_better: bool,
) -> Vec<f64>
fn compute_with_scorer( &self, parent_entropy: f64, cover: &mut Cover, candidates: &mut Vec<usize>, scorer: Box<dyn Fn(&[usize], &[usize], &[usize], f64) -> f64>, lower_is_better: bool, ) -> Vec<f64>
Scores each candidate with
scorer and sorts them, ascending when
lower_is_better and descending otherwise.Auto Trait Implementations§
impl Freeze for InformationGain
impl RefUnwindSafe for InformationGain
impl Send for InformationGain
impl Sync for InformationGain
impl Unpin for InformationGain
impl UnsafeUnpin for InformationGain
impl UnwindSafe for InformationGain
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