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§
Sourcefn start_distill(&mut self, dim: usize, n_layers: usize, n_nodes: usize)
fn start_distill(&mut self, dim: usize, n_layers: usize, n_nodes: usize)
Called once at the start of the distillation process.
Sourcefn start_layer(&mut self, layer: &Layer)
fn start_layer(&mut self, layer: &Layer)
Called just before each layer is processed.
Sourcefn finish_layer(
&mut self,
layer: &Layer,
new_nodes: usize,
decision_nodes: usize,
terminal_nodes: usize,
)
fn finish_layer( &mut self, layer: &Layer, new_nodes: usize, decision_nodes: usize, terminal_nodes: usize, )
Called after each layer is finished.
Sourcefn finish_distill(&mut self, total_decisions: usize, total_terminals: usize)
fn finish_distill(&mut self, total_decisions: usize, total_terminals: usize)
Called once at the end of the distillation process.