pub struct FittedLabelEncoder { /* private fields */ }Expand description
A fitted label encoder holding the bidirectional label-to-index mapping.
Created by calling Fit::fit on a LabelEncoder.
Implementations§
Source§impl FittedLabelEncoder
impl FittedLabelEncoder
Sourcepub fn classes(&self) -> &[String]
pub fn classes(&self) -> &[String]
Return the ordered list of class labels.
classes[i] is the label corresponding to integer i.
Sourcepub fn inverse_transform(
&self,
y: &Array1<usize>,
) -> Result<Array1<String>, FerroError>
pub fn inverse_transform( &self, y: &Array1<usize>, ) -> Result<Array1<String>, FerroError>
Map integer indices back to the original string labels.
§Errors
Returns FerroError::InvalidParameter if any index is out of range.
Trait Implementations§
Source§impl Clone for FittedLabelEncoder
impl Clone for FittedLabelEncoder
Source§fn clone(&self) -> FittedLabelEncoder
fn clone(&self) -> FittedLabelEncoder
Returns a duplicate of the value. Read more
1.0.0 · 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 FittedLabelEncoder
impl Debug for FittedLabelEncoder
Source§impl Transform<ArrayBase<OwnedRepr<String>, Dim<[usize; 1]>>> for FittedLabelEncoder
impl Transform<ArrayBase<OwnedRepr<String>, Dim<[usize; 1]>>> for FittedLabelEncoder
Auto Trait Implementations§
impl Freeze for FittedLabelEncoder
impl RefUnwindSafe for FittedLabelEncoder
impl Send for FittedLabelEncoder
impl Sync for FittedLabelEncoder
impl Unpin for FittedLabelEncoder
impl UnsafeUnpin for FittedLabelEncoder
impl UnwindSafe for FittedLabelEncoder
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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