pub struct DecisionTreeClassifierParameters {
pub criterion: SplitCriterion,
pub max_depth: Option<u16>,
pub min_samples_leaf: usize,
pub min_samples_split: usize,
pub seed: Option<u64>,
}Expand description
Parameters of Decision Tree
Fields§
§criterion: SplitCriterionSplit criteria to use when building a tree.
max_depth: Option<u16>The maximum depth of the tree.
min_samples_leaf: usizeThe minimum number of samples required to be at a leaf node.
min_samples_split: usizeThe minimum number of samples required to split an internal node.
seed: Option<u64>Controls the randomness of the estimator
Implementations§
Source§impl DecisionTreeClassifierParameters
impl DecisionTreeClassifierParameters
Sourcepub fn with_criterion(self, criterion: SplitCriterion) -> Self
pub fn with_criterion(self, criterion: SplitCriterion) -> Self
Split criteria to use when building a tree.
Sourcepub fn with_max_depth(self, max_depth: u16) -> Self
pub fn with_max_depth(self, max_depth: u16) -> Self
The maximum depth of the tree.
Sourcepub fn with_min_samples_leaf(self, min_samples_leaf: usize) -> Self
pub fn with_min_samples_leaf(self, min_samples_leaf: usize) -> Self
The minimum number of samples required to be at a leaf node.
Sourcepub fn with_min_samples_split(self, min_samples_split: usize) -> Self
pub fn with_min_samples_split(self, min_samples_split: usize) -> Self
The minimum number of samples required to split an internal node.
Trait Implementations§
Source§impl Clone for DecisionTreeClassifierParameters
impl Clone for DecisionTreeClassifierParameters
Source§fn clone(&self) -> DecisionTreeClassifierParameters
fn clone(&self) -> DecisionTreeClassifierParameters
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<TX: Number + PartialOrd, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> SupervisedEstimator<X, Y, DecisionTreeClassifierParameters> for DecisionTreeClassifier<TX, TY, X, Y>
impl<TX: Number + PartialOrd, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> SupervisedEstimator<X, Y, DecisionTreeClassifierParameters> for DecisionTreeClassifier<TX, TY, X, Y>
Auto Trait Implementations§
impl Freeze for DecisionTreeClassifierParameters
impl RefUnwindSafe for DecisionTreeClassifierParameters
impl Send for DecisionTreeClassifierParameters
impl Sync for DecisionTreeClassifierParameters
impl Unpin for DecisionTreeClassifierParameters
impl UnsafeUnpin for DecisionTreeClassifierParameters
impl UnwindSafe for DecisionTreeClassifierParameters
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