pub struct FittedBinaryEncoder<F> { /* private fields */ }Expand description
A fitted binary encoder holding the number of categories and binary digits per input feature.
Created by calling Fit::fit on a BinaryEncoder.
Implementations§
Source§impl<F: Float + Send + Sync + 'static> FittedBinaryEncoder<F>
impl<F: Float + Send + Sync + 'static> FittedBinaryEncoder<F>
Sourcepub fn n_categories(&self) -> &[usize]
pub fn n_categories(&self) -> &[usize]
Return the number of categories per feature.
Sourcepub fn n_output_features(&self) -> usize
pub fn n_output_features(&self) -> usize
Return the total number of output columns.
Trait Implementations§
Source§impl<F: Clone> Clone for FittedBinaryEncoder<F>
impl<F: Clone> Clone for FittedBinaryEncoder<F>
Source§fn clone(&self) -> FittedBinaryEncoder<F>
fn clone(&self) -> FittedBinaryEncoder<F>
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<F: Debug> Debug for FittedBinaryEncoder<F>
impl<F: Debug> Debug for FittedBinaryEncoder<F>
Source§impl<F: Float + Send + Sync + 'static> Transform<ArrayBase<OwnedRepr<usize>, Dim<[usize; 2]>>> for FittedBinaryEncoder<F>
impl<F: Float + Send + Sync + 'static> Transform<ArrayBase<OwnedRepr<usize>, Dim<[usize; 2]>>> for FittedBinaryEncoder<F>
Source§fn transform(&self, x: &Array2<usize>) -> Result<Array2<F>, FerroError>
fn transform(&self, x: &Array2<usize>) -> Result<Array2<F>, FerroError>
Transform categorical data into binary encoded columns.
§Errors
Returns FerroError::ShapeMismatch if the number of columns differs
from the number of features seen during fitting.
Returns FerroError::InvalidParameter if any category value exceeds
the maximum seen during fitting.
Source§type Error = FerroError
type Error = FerroError
The error type returned by
transform.Auto Trait Implementations§
impl<F> Freeze for FittedBinaryEncoder<F>
impl<F> RefUnwindSafe for FittedBinaryEncoder<F>where
F: RefUnwindSafe,
impl<F> Send for FittedBinaryEncoder<F>where
F: Send,
impl<F> Sync for FittedBinaryEncoder<F>where
F: Sync,
impl<F> Unpin for FittedBinaryEncoder<F>where
F: Unpin,
impl<F> UnsafeUnpin for FittedBinaryEncoder<F>
impl<F> UnwindSafe for FittedBinaryEncoder<F>where
F: UnwindSafe,
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