pub struct DecisionTreeConfig {Show 16 fields
pub criterion: SplitCriterion,
pub max_depth: Option<usize>,
pub min_samples_split: usize,
pub min_samples_leaf: usize,
pub max_features: MaxFeatures,
pub random_state: Option<u64>,
pub min_weight_fraction_leaf: f64,
pub min_impurity_decrease: f64,
pub pruning: PruningStrategy,
pub missing_values: MissingValueStrategy,
pub feature_types: Option<Vec<FeatureType>>,
pub growing_strategy: TreeGrowingStrategy,
pub split_type: SplitType,
pub monotonic_constraints: Option<Vec<MonotonicConstraint>>,
pub interaction_constraints: InteractionConstraint,
pub feature_grouping: FeatureGrouping,
}Expand description
Configuration for Decision Trees
Fields§
§criterion: SplitCriterionSplit criterion
max_depth: Option<usize>Maximum depth of the tree
min_samples_split: usizeMinimum samples required to split an internal node
min_samples_leaf: usizeMinimum samples required to be at a leaf node
max_features: MaxFeaturesMaximum number of features to consider for splits
random_state: Option<u64>Random seed for reproducibility
min_weight_fraction_leaf: f64Minimum weighted fraction of samples required to be at a leaf
min_impurity_decrease: f64Minimum impurity decrease required for a split
pruning: PruningStrategyPruning strategy to apply
missing_values: MissingValueStrategyStrategy for handling missing values
feature_types: Option<Vec<FeatureType>>Feature types for each feature (enables multiway splits for categorical features)
growing_strategy: TreeGrowingStrategyTree growing strategy
split_type: SplitTypeSplit type (axis-aligned or oblique)
monotonic_constraints: Option<Vec<MonotonicConstraint>>Monotonic constraints for each feature
interaction_constraints: InteractionConstraintInteraction constraints between features
feature_grouping: FeatureGroupingFeature grouping strategy for handling correlated features
Trait Implementations§
Source§impl Clone for DecisionTreeConfig
impl Clone for DecisionTreeConfig
Source§fn clone(&self) -> DecisionTreeConfig
fn clone(&self) -> DecisionTreeConfig
Returns a duplicate 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 Debug for DecisionTreeConfig
impl Debug for DecisionTreeConfig
Auto Trait Implementations§
impl Freeze for DecisionTreeConfig
impl RefUnwindSafe for DecisionTreeConfig
impl Send for DecisionTreeConfig
impl Sync for DecisionTreeConfig
impl Unpin for DecisionTreeConfig
impl UnwindSafe for DecisionTreeConfig
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