Skip to main content

TreeSearchAlgorithm

Trait TreeSearchAlgorithm 

Source
pub trait TreeSearchAlgorithm {
    // Required methods
    fn fit(&mut self, cover: &mut Cover) -> Result<(), FitError>;
    fn tree(&self) -> &Tree;

    // Provided methods
    fn error(&self) -> f64 { ... }
    fn get_candidates(
        &self,
        cover: &mut Cover,
        min_sup: usize,
        provided_candidates: Option<&[usize]>,
        previous: Option<usize>,
    ) -> Vec<usize> { ... }
}
Expand description

A tree learner.

Required Methods§

Source

fn fit(&mut self, cover: &mut Cover) -> Result<(), FitError>

Learns a tree on the instances of cover.

Source

fn tree(&self) -> &Tree

The tree learned by the last fit.

Provided Methods§

Source

fn error(&self) -> f64

Training error of the learned tree.

Source

fn get_candidates( &self, cover: &mut Cover, min_sup: usize, provided_candidates: Option<&[usize]>, previous: Option<usize>, ) -> Vec<usize>

Features that can split the current node. See find_valid_split_attributes.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<C, D, E, H> TreeSearchAlgorithm for DL85<C, D, E, H>

Source§

impl<D> TreeSearchAlgorithm for LGDT<D>