pub struct Splitter {
pub l2: f32,
pub gamma: f32,
pub min_leaf_weight: f32,
pub learning_rate: f32,
pub allow_missing_splits: bool,
pub impute_missing: bool,
pub constraints_map: ConstraintMap,
}Fields
l2: f32gamma: f32min_leaf_weight: f32learning_rate: f32allow_missing_splits: boolimpute_missing: boolconstraints_map: ConstraintMapImplementations
sourceimpl Splitter
impl Splitter
pub fn new(
l2: f32,
gamma: f32,
min_leaf_weight: f32,
learning_rate: f32,
allow_missing_splits: bool,
impute_missing: bool,
constraints_map: ConstraintMap
) -> Self
pub fn best_split(&self, node: &SplittableNode) -> Option<SplitInfo>
pub fn best_feature_split(
&self,
node: &SplittableNode,
feature: usize
) -> Option<SplitInfo>
pub fn constrained_weight(
&self,
grad_sum: f32,
hess_sum: f32,
lower_bound: f32,
upper_bound: f32,
constraint: Option<&Constraint>
) -> f32
pub fn gain(&self, grad_sum: f32, hess_sum: f32) -> f32
pub fn gain_given_weight(&self, grad_sum: f32, hess_sum: f32, weight: f32) -> f32
pub fn cull_gain(
&self,
gain: f32,
left_weight: f32,
right_weight: f32,
constraint: Option<&Constraint>
) -> f32
pub fn weight(&self, grad_sum: f32, hess_sum: f32) -> f32
Auto Trait Implementations
impl RefUnwindSafe for Splitter
impl Send for Splitter
impl Sync for Splitter
impl Unpin for Splitter
impl UnwindSafe for Splitter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more