pub struct TrainConfig {Show 16 fields
pub algorithm: TrainAlgorithm,
pub task: Task,
pub tree_type: TreeType,
pub criterion: Criterion,
pub max_depth: Option<usize>,
pub min_samples_split: Option<usize>,
pub min_samples_leaf: Option<usize>,
pub physical_cores: Option<usize>,
pub n_trees: Option<usize>,
pub max_features: MaxFeatures,
pub seed: Option<u64>,
pub compute_oob: bool,
pub learning_rate: Option<f64>,
pub bootstrap: bool,
pub top_gradient_fraction: Option<f64>,
pub other_gradient_fraction: Option<f64>,
}Expand description
Unified training configuration shared by the Rust and Python entry points.
The crate keeps one normalized config type so the binding layer only has to perform input validation and type conversion; all semantic decisions happen from this one structure downward.
Fields§
§algorithm: TrainAlgorithmHigh-level training family.
task: TaskRegression or classification.
tree_type: TreeTypeTree learner used by the selected algorithm family.
criterion: CriterionSplit criterion. Criterion::Auto is resolved by the trainer.
max_depth: Option<usize>Maximum tree depth.
min_samples_split: Option<usize>Smallest node size that is still allowed to split.
min_samples_leaf: Option<usize>Minimum child size after a split.
physical_cores: Option<usize>Optional cap on training-side rayon threads.
n_trees: Option<usize>Number of trees for ensemble algorithms.
max_features: MaxFeaturesFeature subsampling strategy.
seed: Option<u64>Seed used for reproducible sampling and randomized splits.
compute_oob: boolWhether random forests should compute out-of-bag metrics.
learning_rate: Option<f64>Gradient boosting shrinkage factor.
bootstrap: boolWhether gradient boosting should bootstrap rows before gradient sampling.
top_gradient_fraction: Option<f64>Fraction of largest-gradient rows always kept by GOSS sampling.
other_gradient_fraction: Option<f64>Fraction of the remaining rows randomly retained by GOSS sampling.
Trait Implementations§
Source§impl Clone for TrainConfig
impl Clone for TrainConfig
Source§fn clone(&self) -> TrainConfig
fn clone(&self) -> TrainConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TrainConfig
impl Debug for TrainConfig
Source§impl Default for TrainConfig
impl Default for TrainConfig
impl Copy for TrainConfig
Auto Trait Implementations§
impl Freeze for TrainConfig
impl RefUnwindSafe for TrainConfig
impl Send for TrainConfig
impl Sync for TrainConfig
impl Unpin for TrainConfig
impl UnsafeUnpin for TrainConfig
impl UnwindSafe for TrainConfig
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
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>
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>
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