Skip to main content

SGBTConfigBuilder

Struct SGBTConfigBuilder 

Source
pub struct SGBTConfigBuilder { /* private fields */ }
Available on crate feature alloc only.
Expand description

Builder for SGBTConfig with validation on build().

Implementations§

Source§

impl SGBTConfigBuilder

Source

pub fn n_steps(self, n: usize) -> Self

Set the number of boosting steps (trees).

Source

pub fn learning_rate(self, lr: f64) -> Self

Set the learning rate (shrinkage).

Source

pub fn feature_subsample_rate(self, rate: f64) -> Self

Set the feature subsampling rate (0.0..=1.0).

Source

pub fn max_depth(self, depth: usize) -> Self

Set the maximum tree depth.

Source

pub fn n_bins(self, bins: usize) -> Self

Set the number of histogram bins per feature.

Source

pub fn lambda(self, l: f64) -> Self

Set the L2 regularization coefficient on leaf values.

Source

pub fn gamma(self, g: f64) -> Self

Set the minimum split gain (gamma).

Source

pub fn grace_period(self, gp: usize) -> Self

Set the Hoeffding bound grace period (minimum samples before splits).

Source

pub fn delta(self, d: f64) -> Self

Set the Hoeffding bound confidence parameter.

Source

pub fn drift_detector(self, dt: DriftDetectorType) -> Self

Set the drift detector configuration.

Source

pub fn variant(self, v: SGBTVariant) -> Self

Set the algorithm variant.

Source

pub fn seed(self, seed: u64) -> Self

Set the random seed.

Source

pub fn initial_target_count(self, count: usize) -> Self

Set the number of targets to buffer before fixing the base prediction.

Source

pub fn leaf_half_life(self, n: usize) -> Self

Set the leaf value exponential half-life in samples.

Source

pub fn max_tree_samples(self, n: u64) -> Self

Set the maximum samples per tree before replacement.

Source

pub fn adaptive_mts(self, base_mts: u64, k: f64) -> Self

Set adaptive MTS parameters: warmup samples and percentile.

Source

pub fn adaptive_mts_floor(self, fraction: f64) -> Self

Set the floor on the adaptive MTS threshold.

Source

pub fn proactive_prune_interval(self, interval: u64) -> Self

Set the proactive pruning interval in samples.

Source

pub fn split_reeval_interval(self, n: usize) -> Self

Set the split re-evaluation interval in samples.

Source

pub fn feature_names(self, names: Vec<String>) -> Self

Set human-readable feature names (used in diagnostics).

Source

pub fn feature_types(self, types: Vec<FeatureType>) -> Self

Set per-feature type hints (continuous vs. categorical).

Source

pub fn gradient_clip_sigma(self, sigma: f64) -> Self

Set gradient clipping sigma multiplier.

Source

pub fn monotone_constraints(self, constraints: Vec<i8>) -> Self

Set per-feature monotonicity constraints (1, -1, or 0).

Source

pub fn quality_prune_alpha(self, alpha: f64) -> Self

Set quality pruning significance level (alpha).

Source

pub fn quality_prune_threshold(self, threshold: f64) -> Self

Set minimum EWMA contribution for quality pruning survival.

Source

pub fn quality_prune_patience(self, patience: u64) -> Self

Set consecutive low-contribution patience before quality pruning.

Source

pub fn error_weight_alpha(self, alpha: f64) -> Self

Set error-weighted sample importance EWMA alpha.

Source

pub fn uncertainty_modulated_lr(self, enabled: bool) -> Self

Enable or disable uncertainty-modulated learning rate.

Source

pub fn scale_mode(self, mode: ScaleMode) -> Self

Set the scale mode for distributional SGBT.

Source

pub fn empirical_sigma_alpha(self, alpha: f64) -> Self

Set the EWMA alpha for empirical sigma estimation.

Source

pub fn max_leaf_output(self, max: f64) -> Self

Set the maximum absolute leaf output (clamp).

Source

pub fn adaptive_leaf_bound(self, k: f64) -> Self

Set the adaptive leaf output bound multiplier.

Source

pub fn adaptive_depth(self, factor: f64) -> Self

Set the adaptive depth fractional limit.

Source

pub fn min_hessian_sum(self, min_h: f64) -> Self

Set the minimum hessian sum required to accept a split.

Source

pub fn huber_k(self, k: f64) -> Self

Set the Huber loss delta override.

Source

pub fn shadow_warmup(self, warmup: usize) -> Self

Set the shadow warmup samples before tree replacement.

Source

pub fn leaf_model_type(self, lmt: LeafModelType) -> Self

Set the leaf model type (constant, linear, MLP).

Source

pub fn packed_refresh_interval(self, interval: u64) -> Self

Set the packed-node cache refresh interval in samples.

Source

pub fn hoeffding_r(self, r: f64) -> Self

Override the Hoeffding bound range R (default 1.0).

Source

pub fn build(self) -> Result<SGBTConfig>

Validate and build the configuration.

Trait Implementations§

Source§

impl Clone for SGBTConfigBuilder

Source§

fn clone(&self) -> SGBTConfigBuilder

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 SGBTConfigBuilder

Source§

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

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

impl Default for SGBTConfigBuilder

Source§

fn default() -> SGBTConfigBuilder

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

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, 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.