pub enum HandleUnknown {
Error,
UseEncodedValue,
}Expand description
How OrdinalEncoder treats categories at transform time that were not
seen during fit.
Mirrors scikit-learn’s OrdinalEncoder(handle_unknown=...) parameter
(sklearn/preprocessing/_encoders.py:1262), which accepts 'error' and
'use_encoded_value'.
Variants§
Error
Raise an error on any unknown category (scikit-learn’s default
handle_unknown='error'). This is also the default here.
UseEncodedValue
Encode unknown categories with the configured unknown_value sentinel
(scikit-learn’s handle_unknown='use_encoded_value'). Requires
unknown_value to be set.
Trait Implementations§
Source§impl Clone for HandleUnknown
impl Clone for HandleUnknown
Source§fn clone(&self) -> HandleUnknown
fn clone(&self) -> HandleUnknown
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 HandleUnknown
Source§impl Debug for HandleUnknown
impl Debug for HandleUnknown
Source§impl Default for HandleUnknown
impl Default for HandleUnknown
Source§fn default() -> HandleUnknown
fn default() -> HandleUnknown
Returns the “default value” for a type. Read more
impl Eq for HandleUnknown
Source§impl PartialEq for HandleUnknown
impl PartialEq for HandleUnknown
Source§fn eq(&self, other: &HandleUnknown) -> bool
fn eq(&self, other: &HandleUnknown) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HandleUnknown
Auto Trait Implementations§
impl Freeze for HandleUnknown
impl RefUnwindSafe for HandleUnknown
impl Send for HandleUnknown
impl Sync for HandleUnknown
impl Unpin for HandleUnknown
impl UnsafeUnpin for HandleUnknown
impl UnwindSafe for HandleUnknown
Blanket Implementations§
impl<T> Boilerplate for T
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.