Trait DTrees_NodeTraitConst

Source
pub trait DTrees_NodeTraitConst {
    // Required method
    fn as_raw_DTrees_Node(&self) -> *const c_void;

    // Provided methods
    fn value(&self) -> f64 { ... }
    fn class_idx(&self) -> i32 { ... }
    fn parent(&self) -> i32 { ... }
    fn left(&self) -> i32 { ... }
    fn right(&self) -> i32 { ... }
    fn default_dir(&self) -> i32 { ... }
    fn split(&self) -> i32 { ... }
}
Expand description

Constant methods for crate::ml::DTrees_Node

Required Methods§

Provided Methods§

Source

fn value(&self) -> f64

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

Source

fn class_idx(&self) -> 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 parent(&self) -> i32

Index of the parent node

Source

fn left(&self) -> i32

Index of the left child node

Source

fn right(&self) -> i32

Index of right child node

Source

fn default_dir(&self) -> i32

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

Source

fn split(&self) -> i32

Index of the first split

Implementors§