pub enum UnknownCategoryPolicy {
Error,
MapToOther {
other_code: u64,
},
MapToNull,
ExtendDictionary,
}Expand description
Policy for intern_with_policy when a byte sequence is not in the
dictionary AND the dictionary is frozen.
Error: returnErr(UnknownCategory). Strictest. Recommended for safety-critical inference pipelines where a previously-unseen category indicates a real data issue.MapToOther: return the code of a designated “Other” bucket. The bucket must be added before freezing — the dictionary does not silently create one.MapToNull: returnOk(None), signalling the caller should mark the row as null in the categorical column’s null bitmap.ExtendDictionary: ignore the frozen flag and add the value. Only safe in training; never in inference.
Variants§
Trait Implementations§
Source§impl Clone for UnknownCategoryPolicy
impl Clone for UnknownCategoryPolicy
Source§fn clone(&self) -> UnknownCategoryPolicy
fn clone(&self) -> UnknownCategoryPolicy
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 moreSource§impl Debug for UnknownCategoryPolicy
impl Debug for UnknownCategoryPolicy
Source§impl PartialEq for UnknownCategoryPolicy
impl PartialEq for UnknownCategoryPolicy
Source§fn eq(&self, other: &UnknownCategoryPolicy) -> bool
fn eq(&self, other: &UnknownCategoryPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for UnknownCategoryPolicy
impl StructuralPartialEq for UnknownCategoryPolicy
Auto Trait Implementations§
impl Freeze for UnknownCategoryPolicy
impl RefUnwindSafe for UnknownCategoryPolicy
impl Send for UnknownCategoryPolicy
impl Sync for UnknownCategoryPolicy
impl Unpin for UnknownCategoryPolicy
impl UnsafeUnpin for UnknownCategoryPolicy
impl UnwindSafe for UnknownCategoryPolicy
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> 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>
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