pub struct RandomForestConfig {Show 16 fields
pub n_estimators: usize,
pub criterion: SplitCriterion,
pub max_depth: Option<usize>,
pub min_samples_split: usize,
pub min_samples_leaf: usize,
pub max_features: MaxFeatures,
pub bootstrap: bool,
pub oob_score: bool,
pub random_state: Option<u64>,
pub n_jobs: Option<i32>,
pub min_weight_fraction_leaf: f64,
pub max_leaf_nodes: Option<usize>,
pub min_impurity_decrease: f64,
pub warm_start: bool,
pub class_weight: ClassWeight,
pub sampling_strategy: SamplingStrategy,
}Expand description
Configuration for Random Forest
Fields§
§n_estimators: usizeNumber of trees in the forest
criterion: SplitCriterionSplit criterion for individual trees
max_depth: Option<usize>Maximum depth of individual trees
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
bootstrap: boolWhether to bootstrap samples when building trees
oob_score: boolWhether to use out-of-bag samples to estimate generalization error
random_state: Option<u64>Random seed for reproducibility
n_jobs: Option<i32>Number of jobs for parallel computation
min_weight_fraction_leaf: f64Minimum weighted fraction of samples required to be at a leaf
max_leaf_nodes: Option<usize>Maximum number of leaf nodes
min_impurity_decrease: f64Minimum impurity decrease required for a split
warm_start: boolWarm start (reuse previous solution)
class_weight: ClassWeightClass weighting strategy for imbalanced datasets
sampling_strategy: SamplingStrategySampling strategy for building trees
Trait Implementations§
Source§impl Clone for RandomForestConfig
impl Clone for RandomForestConfig
Source§fn clone(&self) -> RandomForestConfig
fn clone(&self) -> RandomForestConfig
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 RandomForestConfig
impl Debug for RandomForestConfig
Auto Trait Implementations§
impl Freeze for RandomForestConfig
impl RefUnwindSafe for RandomForestConfig
impl Send for RandomForestConfig
impl Sync for RandomForestConfig
impl Unpin for RandomForestConfig
impl UnwindSafe for RandomForestConfig
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