pub enum NewFeaturePolicy {
Reject,
Ignore,
}Expand description
Policy for handling new FeatureIds once FtrlConfig::max_features
has been reached.
max_features only constrains feature insertion; features already in
the model continue to train regardless of the policy.
Variants§
Reject
Reject the entire learn call with RillError::InvalidState when
adding the new features in the current sample would exceed
max_features. The call is failure-atomic: no state changes.
Ignore
Keep training existing features but silently skip any new feature
that would exceed max_features. The sample counter still
advances and existing features still receive their gradient update.
Trait Implementations§
Source§impl Clone for NewFeaturePolicy
impl Clone for NewFeaturePolicy
Source§fn clone(&self) -> NewFeaturePolicy
fn clone(&self) -> NewFeaturePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NewFeaturePolicy
Source§impl Debug for NewFeaturePolicy
impl Debug for NewFeaturePolicy
Source§impl Default for NewFeaturePolicy
impl Default for NewFeaturePolicy
Source§fn default() -> NewFeaturePolicy
fn default() -> NewFeaturePolicy
Returns the “default value” for a type. Read more
impl Eq for NewFeaturePolicy
Source§impl PartialEq for NewFeaturePolicy
impl PartialEq for NewFeaturePolicy
impl StructuralPartialEq for NewFeaturePolicy
Auto Trait Implementations§
impl Freeze for NewFeaturePolicy
impl RefUnwindSafe for NewFeaturePolicy
impl Send for NewFeaturePolicy
impl Sync for NewFeaturePolicy
impl Unpin for NewFeaturePolicy
impl UnsafeUnpin for NewFeaturePolicy
impl UnwindSafe for NewFeaturePolicy
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