pub struct ErrorMinimizer<E>where
E: ErrorWrapper + ?Sized,{ /* private fields */ }Expand description
Depth-2 solver that minimises the error of the tree: the optimal tree of depth at most 2.
Implementations§
Source§impl<E> ErrorMinimizer<E>where
E: ErrorWrapper + ?Sized,
impl<E> ErrorMinimizer<E>where
E: ErrorWrapper + ?Sized,
Trait Implementations§
Source§impl Default for ErrorMinimizer<NativeError>
impl Default for ErrorMinimizer<NativeError>
Source§impl<E> OptimalDepth2Tree for ErrorMinimizer<E>where
E: ErrorWrapper + ?Sized,
impl<E> OptimalDepth2Tree for ErrorMinimizer<E>where
E: ErrorWrapper + ?Sized,
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 ErrorMinimizer<E>where
E: ?Sized,
impl<E> RefUnwindSafe for ErrorMinimizer<E>where
E: RefUnwindSafe + ?Sized,
impl<E> Send for ErrorMinimizer<E>where
E: ?Sized,
impl<E> Sync for ErrorMinimizer<E>where
E: ?Sized,
impl<E> Unpin for ErrorMinimizer<E>where
E: ?Sized,
impl<E> UnsafeUnpin for ErrorMinimizer<E>where
E: ?Sized,
impl<E> UnwindSafe for ErrorMinimizer<E>where
E: UnwindSafe + ?Sized,
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