pub struct OrdinalEncoder {
pub handle_unknown: HandleUnknown,
pub unknown_value: Option<f32>,
/* private fields */
}Expand description
Ordinal Encoder - encodes categorical features as integers
Fields§
§handle_unknown: HandleUnknown§unknown_value: Option<f32>Implementations§
Source§impl OrdinalEncoder
impl OrdinalEncoder
pub fn new() -> Self
pub fn handle_unknown(self, h: HandleUnknown, value: Option<f32>) -> Self
pub fn fit(&mut self, x: &[Vec<String>])
pub fn transform(&self, x: &[Vec<String>]) -> Vec<Vec<f32>>
pub fn fit_transform(&mut self, x: &[Vec<String>]) -> Vec<Vec<f32>>
pub fn inverse_transform(&self, x: &[Vec<f32>]) -> Vec<Vec<String>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OrdinalEncoder
impl RefUnwindSafe for OrdinalEncoder
impl Send for OrdinalEncoder
impl Sync for OrdinalEncoder
impl Unpin for OrdinalEncoder
impl UnwindSafe for OrdinalEncoder
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> 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