Trait DTrees_NodeTrait

Source
pub trait DTrees_NodeTrait: DTrees_NodeTraitConst {
    // Required method
    fn as_raw_mut_DTrees_Node(&mut self) -> *mut c_void;

    // Provided methods
    fn set_value(&mut self, val: f64) { ... }
    fn set_class_idx(&mut self, val: i32) { ... }
    fn set_parent(&mut self, val: i32) { ... }
    fn set_left(&mut self, val: i32) { ... }
    fn set_right(&mut self, val: i32) { ... }
    fn set_default_dir(&mut self, val: i32) { ... }
    fn set_split(&mut self, val: i32) { ... }
}
Expand description

Mutable methods for crate::ml::DTrees_Node

Required Methods§

Provided Methods§

Source

fn set_value(&mut self, val: f64)

Value at the node: a class label in case of classification or estimated function value in case of regression.

Source

fn set_class_idx(&mut self, val: i32)

Class index normalized to 0..class_count-1 range and assigned to the node. It is used internally in classification trees and tree ensembles.

Source

fn set_parent(&mut self, val: i32)

Index of the parent node

Source

fn set_left(&mut self, val: i32)

Index of the left child node

Source

fn set_right(&mut self, val: i32)

Index of right child node

Source

fn set_default_dir(&mut self, val: i32)

Default direction where to go (-1: left or +1: right). It helps in the case of missing values.

Source

fn set_split(&mut self, val: i32)

Index of the first split

Implementors§