Skip to main content

SGBTConfig

Struct SGBTConfig 

Source
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>,
}
Available on crate feature alloc only.
Expand description

Configuration for the SGBT ensemble.

All numeric parameters are validated at build time via SGBTConfigBuilder.

Fields§

§n_steps: usize

Number of sequential boosting steps (trees) in the ensemble.

§learning_rate: f64

Shrinkage applied to each tree’s contribution.

§feature_subsample_rate: f64

Fraction of features sampled per split candidate evaluation.

§max_depth: usize

Maximum tree depth (split decisions per root-to-leaf path).

§n_bins: usize

Number of histogram bins per feature for split evaluation.

§lambda: f64

L2 regularization on leaf values (lambda in XGBoost objective).

§gamma: f64

Minimum gain required to accept a split (gamma in XGBoost).

§grace_period: usize

Hoeffding bound grace period: minimum samples before any split is considered.

§delta: f64

Hoeffding bound confidence parameter (smaller = more conservative splits).

§drift_detector: DriftDetectorType

Drift detector configuration used for each boosting step.

§variant: SGBTVariant

Which SGBT algorithm variant to use.

§seed: u64

Random seed for feature subsampling and tie-breaking.

§initial_target_count: usize

Number 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: f64

Floor 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: f64

Minimum EWMA contribution magnitude for a step to survive quality pruning.

§quality_prune_patience: u64

Consecutive 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: bool

Whether to modulate the learning rate by the model’s estimated uncertainty.

§scale_mode: ScaleMode

Strategy for computing the scale (uncertainty) head in distributional mode.

§empirical_sigma_alpha: f64

EWMA 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: LeafModelType

Leaf model type (constant, linear, MLP). Default is constant value.

§packed_refresh_interval: u64

Interval (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

Source

pub fn builder() -> SGBTConfigBuilder

Create a new builder for SGBTConfig.

Trait Implementations§

Source§

impl Clone for SGBTConfig

Source§

fn clone(&self) -> SGBTConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SGBTConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SGBTConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for SGBTConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for SGBTConfig

Source§

fn eq(&self, other: &SGBTConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SGBTConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.