pub struct SGBTConfigBuilder { /* private fields */ }alloc only.Expand description
Builder for SGBTConfig with validation on build().
Implementations§
Source§impl SGBTConfigBuilder
impl SGBTConfigBuilder
Sourcepub fn learning_rate(self, lr: f64) -> Self
pub fn learning_rate(self, lr: f64) -> Self
Set the learning rate (shrinkage).
Sourcepub fn feature_subsample_rate(self, rate: f64) -> Self
pub fn feature_subsample_rate(self, rate: f64) -> Self
Set the feature subsampling rate (0.0..=1.0).
Sourcepub fn grace_period(self, gp: usize) -> Self
pub fn grace_period(self, gp: usize) -> Self
Set the Hoeffding bound grace period (minimum samples before splits).
Sourcepub fn drift_detector(self, dt: DriftDetectorType) -> Self
pub fn drift_detector(self, dt: DriftDetectorType) -> Self
Set the drift detector configuration.
Sourcepub fn variant(self, v: SGBTVariant) -> Self
pub fn variant(self, v: SGBTVariant) -> Self
Set the algorithm variant.
Sourcepub fn initial_target_count(self, count: usize) -> Self
pub fn initial_target_count(self, count: usize) -> Self
Set the number of targets to buffer before fixing the base prediction.
Sourcepub fn leaf_half_life(self, n: usize) -> Self
pub fn leaf_half_life(self, n: usize) -> Self
Set the leaf value exponential half-life in samples.
Sourcepub fn max_tree_samples(self, n: u64) -> Self
pub fn max_tree_samples(self, n: u64) -> Self
Set the maximum samples per tree before replacement.
Sourcepub fn adaptive_mts(self, base_mts: u64, k: f64) -> Self
pub fn adaptive_mts(self, base_mts: u64, k: f64) -> Self
Set adaptive MTS parameters: warmup samples and percentile.
Sourcepub fn adaptive_mts_floor(self, fraction: f64) -> Self
pub fn adaptive_mts_floor(self, fraction: f64) -> Self
Set the floor on the adaptive MTS threshold.
Sourcepub fn proactive_prune_interval(self, interval: u64) -> Self
pub fn proactive_prune_interval(self, interval: u64) -> Self
Set the proactive pruning interval in samples.
Sourcepub fn split_reeval_interval(self, n: usize) -> Self
pub fn split_reeval_interval(self, n: usize) -> Self
Set the split re-evaluation interval in samples.
Sourcepub fn feature_names(self, names: Vec<String>) -> Self
pub fn feature_names(self, names: Vec<String>) -> Self
Set human-readable feature names (used in diagnostics).
Sourcepub fn feature_types(self, types: Vec<FeatureType>) -> Self
pub fn feature_types(self, types: Vec<FeatureType>) -> Self
Set per-feature type hints (continuous vs. categorical).
Sourcepub fn gradient_clip_sigma(self, sigma: f64) -> Self
pub fn gradient_clip_sigma(self, sigma: f64) -> Self
Set gradient clipping sigma multiplier.
Sourcepub fn monotone_constraints(self, constraints: Vec<i8>) -> Self
pub fn monotone_constraints(self, constraints: Vec<i8>) -> Self
Set per-feature monotonicity constraints (1, -1, or 0).
Sourcepub fn quality_prune_alpha(self, alpha: f64) -> Self
pub fn quality_prune_alpha(self, alpha: f64) -> Self
Set quality pruning significance level (alpha).
Sourcepub fn quality_prune_threshold(self, threshold: f64) -> Self
pub fn quality_prune_threshold(self, threshold: f64) -> Self
Set minimum EWMA contribution for quality pruning survival.
Sourcepub fn quality_prune_patience(self, patience: u64) -> Self
pub fn quality_prune_patience(self, patience: u64) -> Self
Set consecutive low-contribution patience before quality pruning.
Sourcepub fn error_weight_alpha(self, alpha: f64) -> Self
pub fn error_weight_alpha(self, alpha: f64) -> Self
Set error-weighted sample importance EWMA alpha.
Sourcepub fn uncertainty_modulated_lr(self, enabled: bool) -> Self
pub fn uncertainty_modulated_lr(self, enabled: bool) -> Self
Enable or disable uncertainty-modulated learning rate.
Sourcepub fn scale_mode(self, mode: ScaleMode) -> Self
pub fn scale_mode(self, mode: ScaleMode) -> Self
Set the scale mode for distributional SGBT.
Sourcepub fn empirical_sigma_alpha(self, alpha: f64) -> Self
pub fn empirical_sigma_alpha(self, alpha: f64) -> Self
Set the EWMA alpha for empirical sigma estimation.
Sourcepub fn max_leaf_output(self, max: f64) -> Self
pub fn max_leaf_output(self, max: f64) -> Self
Set the maximum absolute leaf output (clamp).
Sourcepub fn adaptive_leaf_bound(self, k: f64) -> Self
pub fn adaptive_leaf_bound(self, k: f64) -> Self
Set the adaptive leaf output bound multiplier.
Sourcepub fn adaptive_depth(self, factor: f64) -> Self
pub fn adaptive_depth(self, factor: f64) -> Self
Set the adaptive depth fractional limit.
Sourcepub fn min_hessian_sum(self, min_h: f64) -> Self
pub fn min_hessian_sum(self, min_h: f64) -> Self
Set the minimum hessian sum required to accept a split.
Sourcepub fn shadow_warmup(self, warmup: usize) -> Self
pub fn shadow_warmup(self, warmup: usize) -> Self
Set the shadow warmup samples before tree replacement.
Sourcepub fn leaf_model_type(self, lmt: LeafModelType) -> Self
pub fn leaf_model_type(self, lmt: LeafModelType) -> Self
Set the leaf model type (constant, linear, MLP).
Sourcepub fn packed_refresh_interval(self, interval: u64) -> Self
pub fn packed_refresh_interval(self, interval: u64) -> Self
Set the packed-node cache refresh interval in samples.
Sourcepub fn hoeffding_r(self, r: f64) -> Self
pub fn hoeffding_r(self, r: f64) -> Self
Override the Hoeffding bound range R (default 1.0).
Sourcepub fn build(self) -> Result<SGBTConfig>
pub fn build(self) -> Result<SGBTConfig>
Validate and build the configuration.
Trait Implementations§
Source§impl Clone for SGBTConfigBuilder
impl Clone for SGBTConfigBuilder
Source§fn clone(&self) -> SGBTConfigBuilder
fn clone(&self) -> SGBTConfigBuilder
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 SGBTConfigBuilder
impl Debug for SGBTConfigBuilder
Source§impl Default for SGBTConfigBuilder
impl Default for SGBTConfigBuilder
Source§fn default() -> SGBTConfigBuilder
fn default() -> SGBTConfigBuilder
Auto Trait Implementations§
impl Freeze for SGBTConfigBuilder
impl RefUnwindSafe for SGBTConfigBuilder
impl Send for SGBTConfigBuilder
impl Sync for SGBTConfigBuilder
impl Unpin for SGBTConfigBuilder
impl UnsafeUnpin for SGBTConfigBuilder
impl UnwindSafe for SGBTConfigBuilder
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