pub struct GiniIndex;Expand description
Lowest weighted Gini impurity of the children first.
Trait Implementations§
Source§impl Heuristic for GiniIndex
impl Heuristic for GiniIndex
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 GiniIndex
impl RefUnwindSafe for GiniIndex
impl Send for GiniIndex
impl Sync for GiniIndex
impl Unpin for GiniIndex
impl UnsafeUnpin for GiniIndex
impl UnwindSafe for GiniIndex
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