DistillVisitor

Trait DistillVisitor 

Source
pub trait DistillVisitor {
    // Required methods
    fn start_distill(&mut self, dim: usize, n_layers: usize, n_nodes: usize);
    fn start_layer(&mut self, layer: &Layer);
    fn finish_layer(
        &mut self,
        layer: &Layer,
        new_nodes: usize,
        decision_nodes: usize,
        terminal_nodes: usize,
    );
    fn finish_distill(&mut self, total_decisions: usize, total_terminals: usize);
}
Expand description

A visitor pattern for the distillation process.

Use cases include logging or to display progress.

Required Methods§

Source

fn start_distill(&mut self, dim: usize, n_layers: usize, n_nodes: usize)

Called once at the start of the distillation process.

Source

fn start_layer(&mut self, layer: &Layer)

Called just before each layer is processed.

Source

fn finish_layer( &mut self, layer: &Layer, new_nodes: usize, decision_nodes: usize, terminal_nodes: usize, )

Called after each layer is finished.

Source

fn finish_distill(&mut self, total_decisions: usize, total_terminals: usize)

Called once at the end of the distillation process.

Implementors§