pub struct AdaptiveLeafModel { /* private fields */ }Expand description
Leaf model that starts as closed-form and promotes to a more complex model when the Hoeffding bound confirms it is statistically superior.
Runs a shadow model alongside the active (closed-form) model. On each update, both models are trained and their per-sample losses compared using the second-order Taylor approximation:
loss_i = gradient * prediction + 0.5 * hessian * prediction^2
advantage_i = loss_active_i - loss_shadow_iWhen mean(advantage) > epsilon where epsilon is the Hoeffding bound
(using the tree’s delta parameter), the shadow model is promoted to
active and the overhead drops to zero.
This uses the same statistical guarantee as the tree’s split decisions – no arbitrary thresholds.
Implementations§
Trait Implementations§
Source§impl LeafModel for AdaptiveLeafModel
impl LeafModel for AdaptiveLeafModel
impl Send for AdaptiveLeafModel
impl Sync for AdaptiveLeafModel
Auto Trait Implementations§
impl Freeze for AdaptiveLeafModel
impl !RefUnwindSafe for AdaptiveLeafModel
impl Unpin for AdaptiveLeafModel
impl UnsafeUnpin for AdaptiveLeafModel
impl !UnwindSafe for AdaptiveLeafModel
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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 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>
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