Struct linfa_trees::DecisionTreeParams
source · [−]pub struct DecisionTreeParams<F, L>(_);
Implementations
sourceimpl<F: Float, L: Label> DecisionTreeParams<F, L>
impl<F: Float, L: Label> DecisionTreeParams<F, L>
pub fn new() -> Self
sourcepub fn split_quality(self, split_quality: SplitQuality) -> Self
pub fn split_quality(self, split_quality: SplitQuality) -> Self
Sets the metric used to decide the feature on which to split a node
sourcepub fn max_depth(self, max_depth: Option<usize>) -> Self
pub fn max_depth(self, max_depth: Option<usize>) -> Self
Sets the optional limit to the depth of the decision tree
sourcepub fn min_weight_split(self, min_weight_split: f32) -> Self
pub fn min_weight_split(self, min_weight_split: f32) -> Self
Sets the minimum weight of samples required to split a node.
If the observations do not have associated weights, this value represents the minimum number of samples required to split a node.
sourcepub fn min_weight_leaf(self, min_weight_leaf: f32) -> Self
pub fn min_weight_leaf(self, min_weight_leaf: f32) -> Self
Sets the minimum weight of samples that a split has to place in each leaf
If the observations do not have associated weights, this value represents the minimum number of samples that a split has to place in each leaf.
sourcepub fn min_impurity_decrease(self, min_impurity_decrease: F) -> Self
pub fn min_impurity_decrease(self, min_impurity_decrease: F) -> Self
Sets the minimum decrease in impurity that a split needs to bring in order for it to be applied
Trait Implementations
sourceimpl<F: Clone, L: Clone> Clone for DecisionTreeParams<F, L>
impl<F: Clone, L: Clone> Clone for DecisionTreeParams<F, L>
sourcefn clone(&self) -> DecisionTreeParams<F, L>
fn clone(&self) -> DecisionTreeParams<F, L>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<F: Debug, L: Debug> Debug for DecisionTreeParams<F, L>
impl<F: Debug, L: Debug> Debug for DecisionTreeParams<F, L>
sourceimpl<F: Float, L: Label> Default for DecisionTreeParams<F, L>
impl<F: Float, L: Label> Default for DecisionTreeParams<F, L>
sourceimpl<F: Float, L> ParamGuard for DecisionTreeParams<F, L>
impl<F: Float, L> ParamGuard for DecisionTreeParams<F, L>
type Checked = DecisionTreeValidParams<F, L>
type Checked = DecisionTreeValidParams<F, L>
The checked hyperparameters
sourcefn check_ref(&self) -> Result<&Self::Checked>
fn check_ref(&self) -> Result<&Self::Checked>
Checks the hyperparameters and returns a reference to the checked hyperparameters if successful Read more
sourcefn check(self) -> Result<Self::Checked>
fn check(self) -> Result<Self::Checked>
Checks the hyperparameters and returns the checked hyperparameters if successful
sourcefn check_unwrap(self) -> Self::Checked
fn check_unwrap(self) -> Self::Checked
Calls check()
and unwraps the result
sourceimpl<F: PartialEq, L: PartialEq> PartialEq<DecisionTreeParams<F, L>> for DecisionTreeParams<F, L>
impl<F: PartialEq, L: PartialEq> PartialEq<DecisionTreeParams<F, L>> for DecisionTreeParams<F, L>
sourcefn eq(&self, other: &DecisionTreeParams<F, L>) -> bool
fn eq(&self, other: &DecisionTreeParams<F, L>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DecisionTreeParams<F, L>) -> bool
fn ne(&self, other: &DecisionTreeParams<F, L>) -> bool
This method tests for !=
.
impl<F: Copy, L: Copy> Copy for DecisionTreeParams<F, L>
impl<F, L> StructuralPartialEq for DecisionTreeParams<F, L>
Auto Trait Implementations
impl<F, L> RefUnwindSafe for DecisionTreeParams<F, L> where
F: RefUnwindSafe,
L: RefUnwindSafe,
impl<F, L> Send for DecisionTreeParams<F, L> where
F: Send,
L: Send,
impl<F, L> Sync for DecisionTreeParams<F, L> where
F: Sync,
L: Sync,
impl<F, L> Unpin for DecisionTreeParams<F, L> where
F: Unpin,
L: Unpin,
impl<F, L> UnwindSafe for DecisionTreeParams<F, L> where
F: UnwindSafe,
L: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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