pub struct InfoGainMaximizer<E>where
E: ErrorWrapper,{ /* private fields */ }Expand description
Depth-2 solver that maximises the information gain of the tree rather than minimising its error. Used by LGDT for a less greedy lookahead.
Trait Implementations§
Source§impl Default for InfoGainMaximizer<NativeError>
impl Default for InfoGainMaximizer<NativeError>
Source§impl<E> OptimalDepth2Tree for InfoGainMaximizer<E>where
E: ErrorWrapper,
impl<E> OptimalDepth2Tree for InfoGainMaximizer<E>where
E: ErrorWrapper,
Source§fn find_optimal_depth_one_tree(
&self,
min_sup: usize,
cover: &mut Cover,
provided_candidates: Option<&[usize]>,
) -> Result<Tree, FitError>
fn find_optimal_depth_one_tree( &self, min_sup: usize, cover: &mut Cover, provided_candidates: Option<&[usize]>, ) -> Result<Tree, FitError>
The best tree with a single test.
Source§fn find_optimal_depth_two_tree(
&self,
min_sup: usize,
cover: &mut Cover,
provided_candidates: Option<&[usize]>,
) -> Result<Tree, FitError>
fn find_optimal_depth_two_tree( &self, min_sup: usize, cover: &mut Cover, provided_candidates: Option<&[usize]>, ) -> Result<Tree, FitError>
The best tree with at most two levels of tests.
Source§fn error(&self, distribution: &[usize]) -> (f64, f64)
fn error(&self, distribution: &[usize]) -> (f64, f64)
(error, prediction) of a leaf with the given class counts.Auto Trait Implementations§
impl<E> Freeze for InfoGainMaximizer<E>
impl<E> RefUnwindSafe for InfoGainMaximizer<E>where
E: RefUnwindSafe,
impl<E> Send for InfoGainMaximizer<E>
impl<E> Sync for InfoGainMaximizer<E>
impl<E> Unpin for InfoGainMaximizer<E>
impl<E> UnsafeUnpin for InfoGainMaximizer<E>
impl<E> UnwindSafe for InfoGainMaximizer<E>where
E: 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