pub struct FeatureStats {
pub feature_idx: usize,
pub mean: f64,
pub std_dev: f64,
pub min: f64,
pub max: f64,
pub median: f64,
pub n_unique: usize,
pub n_samples: usize,
}Expand description
Statistics for a feature
Fields§
§feature_idx: usizeFeature index
mean: f64Mean value
std_dev: f64Standard deviation
min: f64Minimum value
max: f64Maximum value
median: f64Median value
n_unique: usizeNumber of unique values
n_samples: usizeNumber of samples
Implementations§
Source§impl FeatureStats
impl FeatureStats
Sourcepub fn is_informative(&self) -> bool
pub fn is_informative(&self) -> bool
Check if this feature has enough variation to be useful for splitting
Sourcepub fn coefficient_of_variation(&self) -> f64
pub fn coefficient_of_variation(&self) -> f64
Get coefficient of variation (std_dev / mean)
Trait Implementations§
Source§impl Clone for FeatureStats
impl Clone for FeatureStats
Source§fn clone(&self) -> FeatureStats
fn clone(&self) -> FeatureStats
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 FeatureStats
impl Debug for FeatureStats
Auto Trait Implementations§
impl Freeze for FeatureStats
impl RefUnwindSafe for FeatureStats
impl Send for FeatureStats
impl Sync for FeatureStats
impl Unpin for FeatureStats
impl UnwindSafe for FeatureStats
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