pub struct SGBTConfig {Show 39 fields
pub n_steps: usize,
pub learning_rate: f64,
pub feature_subsample_rate: f64,
pub max_depth: usize,
pub n_bins: usize,
pub lambda: f64,
pub gamma: f64,
pub grace_period: usize,
pub delta: f64,
pub drift_detector: DriftDetectorType,
pub variant: SGBTVariant,
pub seed: u64,
pub initial_target_count: usize,
pub leaf_half_life: Option<usize>,
pub max_tree_samples: Option<u64>,
pub adaptive_mts: Option<(u64, f64)>,
pub adaptive_mts_floor: f64,
pub proactive_prune_interval: Option<u64>,
pub split_reeval_interval: Option<usize>,
pub feature_names: Option<Vec<String>>,
pub feature_types: Option<Vec<FeatureType>>,
pub gradient_clip_sigma: Option<f64>,
pub monotone_constraints: Option<Vec<i8>>,
pub quality_prune_alpha: Option<f64>,
pub quality_prune_threshold: f64,
pub quality_prune_patience: u64,
pub error_weight_alpha: Option<f64>,
pub uncertainty_modulated_lr: bool,
pub scale_mode: ScaleMode,
pub empirical_sigma_alpha: f64,
pub max_leaf_output: Option<f64>,
pub adaptive_leaf_bound: Option<f64>,
pub adaptive_depth: Option<f64>,
pub min_hessian_sum: Option<f64>,
pub huber_k: Option<f64>,
pub shadow_warmup: Option<usize>,
pub leaf_model_type: LeafModelType,
pub packed_refresh_interval: u64,
pub hoeffding_r: Option<f64>,
}alloc only.Expand description
Configuration for the SGBT ensemble.
All numeric parameters are validated at build time via SGBTConfigBuilder.
Fields§
§n_steps: usizeNumber of sequential boosting steps (trees) in the ensemble.
learning_rate: f64Shrinkage applied to each tree’s contribution.
feature_subsample_rate: f64Fraction of features sampled per split candidate evaluation.
max_depth: usizeMaximum tree depth (split decisions per root-to-leaf path).
n_bins: usizeNumber of histogram bins per feature for split evaluation.
lambda: f64L2 regularization on leaf values (lambda in XGBoost objective).
gamma: f64Minimum gain required to accept a split (gamma in XGBoost).
grace_period: usizeHoeffding bound grace period: minimum samples before any split is considered.
delta: f64Hoeffding bound confidence parameter (smaller = more conservative splits).
drift_detector: DriftDetectorTypeDrift detector configuration used for each boosting step.
variant: SGBTVariantWhich SGBT algorithm variant to use.
seed: u64Random seed for feature subsampling and tie-breaking.
initial_target_count: usizeNumber of target samples to buffer before fixing the base prediction.
leaf_half_life: Option<usize>Leaf value exponential half-life (samples). None disables decay.
max_tree_samples: Option<u64>Maximum training samples per tree before the tree is replaced. None = unlimited.
adaptive_mts: Option<(u64, f64)>Adaptive max-tree-samples: (warmup_samples, percentile). Derives the
threshold from the empirical sample distribution rather than a fixed value.
adaptive_mts_floor: f64Floor on the adaptive MTS threshold (prevents degenerate collapses).
proactive_prune_interval: Option<u64>Proactive pruning interval in samples. None disables proactive pruning.
split_reeval_interval: Option<usize>Split re-evaluation interval (samples). None disables periodic re-evaluation.
feature_names: Option<Vec<String>>Human-readable names for each feature column (used in diagnostics/explainability).
feature_types: Option<Vec<FeatureType>>Per-feature type hints (continuous vs. categorical) for the binning strategy.
gradient_clip_sigma: Option<f64>Gradient clipping: clip to sigma * gradient_clip_sigma. None disables.
monotone_constraints: Option<Vec<i8>>Per-feature monotonicity constraints: 1 = increasing, -1 = decreasing, 0 = none.
quality_prune_alpha: Option<f64>Quality pruning significance level (alpha). None disables quality pruning.
quality_prune_threshold: f64Minimum EWMA contribution magnitude for a step to survive quality pruning.
quality_prune_patience: u64Consecutive low-contribution rounds before a step is pruned.
error_weight_alpha: Option<f64>Error-weighted sample importance EWMA alpha. None disables weighting.
uncertainty_modulated_lr: boolWhether to modulate the learning rate by the model’s estimated uncertainty.
scale_mode: ScaleModeStrategy for computing the scale (uncertainty) head in distributional mode.
empirical_sigma_alpha: f64EWMA smoothing factor for the empirical sigma estimate.
max_leaf_output: Option<f64>Maximum absolute leaf output value (clamp). None = no clamp.
adaptive_leaf_bound: Option<f64>Adaptive leaf output bound derived from the rolling leaf magnitude. None disables.
adaptive_depth: Option<f64>Adaptive depth fractional limit derived from leaf sample counts. None disables.
min_hessian_sum: Option<f64>Minimum hessian sum required to accept a split. None = no minimum.
huber_k: Option<f64>Huber loss delta override (used when loss is Huber). None uses the default.
shadow_warmup: Option<usize>Shadow warmup: alternate trees train for this many samples before replacing. None = immediate.
leaf_model_type: LeafModelTypeLeaf model type (constant, linear, MLP). Default is constant value.
packed_refresh_interval: u64Interval (samples) between packed-node cache refreshes for fast inference.
hoeffding_r: Option<f64>Override for the Hoeffding bound range R. None uses the default (1.0).
Implementations§
Source§impl SGBTConfig
impl SGBTConfig
Sourcepub fn builder() -> SGBTConfigBuilder
pub fn builder() -> SGBTConfigBuilder
Create a new builder for SGBTConfig.
Trait Implementations§
Source§impl Clone for SGBTConfig
impl Clone for SGBTConfig
Source§fn clone(&self) -> SGBTConfig
fn clone(&self) -> SGBTConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SGBTConfig
impl Debug for SGBTConfig
Source§impl Default for SGBTConfig
impl Default for SGBTConfig
Source§impl Display for SGBTConfig
impl Display for SGBTConfig
Source§impl PartialEq for SGBTConfig
impl PartialEq for SGBTConfig
Source§fn eq(&self, other: &SGBTConfig) -> bool
fn eq(&self, other: &SGBTConfig) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SGBTConfig
Auto Trait Implementations§
impl Freeze for SGBTConfig
impl RefUnwindSafe for SGBTConfig
impl Send for SGBTConfig
impl Sync for SGBTConfig
impl Unpin for SGBTConfig
impl UnsafeUnpin for SGBTConfig
impl UnwindSafe for SGBTConfig
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