pub struct DecisionTreeParams<F, L>(/* private fields */);
Implementations§
Source§impl<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§
Source§impl<F: Clone, L: Clone> Clone for DecisionTreeParams<F, L>
impl<F: Clone, L: Clone> Clone for DecisionTreeParams<F, L>
Source§fn clone(&self) -> DecisionTreeParams<F, L>
fn clone(&self) -> DecisionTreeParams<F, L>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<F: Float, L: Label> Default for DecisionTreeParams<F, L>
impl<F: Float, L: Label> Default for DecisionTreeParams<F, L>
Source§impl<F: Float, L> ParamGuard for DecisionTreeParams<F, L>
impl<F: Float, L> ParamGuard for DecisionTreeParams<F, L>
Source§type Checked = DecisionTreeValidParams<F, L>
type Checked = DecisionTreeValidParams<F, L>
The checked hyperparameters
Source§fn 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
Source§fn check(self) -> Result<Self::Checked>
fn check(self) -> Result<Self::Checked>
Checks the hyperparameters and returns the checked hyperparameters if successful
§fn check_unwrap(self) -> Self::Checkedwhere
Self: Sized,
fn check_unwrap(self) -> Self::Checkedwhere
Self: Sized,
Calls
check()
and unwraps the resultimpl<F: Copy, L: Copy> Copy for DecisionTreeParams<F, L>
impl<F, L> StructuralPartialEq for DecisionTreeParams<F, L>
Auto Trait Implementations§
impl<F, L> Freeze for DecisionTreeParams<F, L>where
F: Freeze,
impl<F, L> RefUnwindSafe for DecisionTreeParams<F, L>where
F: RefUnwindSafe,
L: RefUnwindSafe,
impl<F, L> Send for DecisionTreeParams<F, L>
impl<F, L> Sync for DecisionTreeParams<F, L>
impl<F, L> Unpin for DecisionTreeParams<F, L>
impl<F, L> UnwindSafe for DecisionTreeParams<F, L>where
F: UnwindSafe,
L: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.