pub struct FeatureBinner { /* private fields */ }Expand description
Feature binning (discretization) utility
Transforms continuous features into discrete bins.
Implementations§
Source§impl FeatureBinner
impl FeatureBinner
Sourcepub fn new(n_bins: usize, strategy: BinningStrategy) -> UtilsResult<Self>
pub fn new(n_bins: usize, strategy: BinningStrategy) -> UtilsResult<Self>
Create a new feature binner
§Arguments
n_bins- Number of bins to createstrategy- Binning strategy
Sourcepub fn fit_transform(&self, x: &Array1<f64>) -> UtilsResult<Array1<usize>>
pub fn fit_transform(&self, x: &Array1<f64>) -> UtilsResult<Array1<usize>>
Trait Implementations§
Source§impl Clone for FeatureBinner
impl Clone for FeatureBinner
Source§fn clone(&self) -> FeatureBinner
fn clone(&self) -> FeatureBinner
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 moreAuto Trait Implementations§
impl Freeze for FeatureBinner
impl RefUnwindSafe for FeatureBinner
impl Send for FeatureBinner
impl Sync for FeatureBinner
impl Unpin for FeatureBinner
impl UnwindSafe for FeatureBinner
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