pub struct MissingImputerSplitter {
    pub l2: f32,
    pub gamma: f32,
    pub min_leaf_weight: f32,
    pub learning_rate: f32,
    pub allow_missing_splits: bool,
    pub constraints_map: ConstraintMap,
}
Expand description

Missing imputer splitter Splitter that imputes missing values, by sending them down either the right or left branch, depending on which results in a higher increase in gain.

Fields§

§l2: f32§gamma: f32§min_leaf_weight: f32§learning_rate: f32§allow_missing_splits: bool§constraints_map: ConstraintMap

Implementations§

source§

impl MissingImputerSplitter

source

pub fn new( l2: f32, gamma: f32, min_leaf_weight: f32, learning_rate: f32, allow_missing_splits: bool, constraints_map: ConstraintMap ) -> Self

Generate a new missing imputer splitter object.

Trait Implementations§

source§

impl Splitter for MissingImputerSplitter

source§

fn evaluate_split( &self, left_gradient: f32, left_hessian: f32, right_gradient: f32, right_hessian: f32, missing_gradient: f32, missing_hessian: f32, lower_bound: f32, upper_bound: f32, constraint: Option<&Constraint> ) -> Option<(NodeInfo, NodeInfo, MissingInfo)>

Evaluate a split, returning the node info for the left, and right splits, as well as the node info the missing data of a feature.
source§

fn handle_split_info( &self, split_info: SplitInfo, n_nodes: &usize, node: &mut SplittableNode, index: &mut [usize], data: &Matrix<'_, u16>, cuts: &JaggedMatrix<f64>, grad: &[f32], hess: &[f32], parallel: bool ) -> Vec<SplittableNode>

Handle the split info, creating the children nodes, for the provided nodes push them onto the growable stack. Return a tuple, where the first value is the number of nodes pushed onto the growable stack, and the second value is the number of potential leaves that have been added.
source§

fn get_constraint(&self, feature: &usize) -> Option<&Constraint>

source§

fn get_gamma(&self) -> f32

source§

fn get_l2(&self) -> f32

source§

fn best_split(&self, node: &SplittableNode) -> Option<SplitInfo>

source§

fn best_feature_split( &self, node: &SplittableNode, feature: usize ) -> Option<SplitInfo>

source§

fn split_node( &self, n_nodes: &usize, node: &mut SplittableNode, index: &mut [usize], data: &Matrix<'_, u16>, cuts: &JaggedMatrix<f64>, grad: &[f32], hess: &[f32], parallel: bool ) -> Vec<SplittableNode>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V