pub enum ScoringFunction {
FClassif,
FRegression,
Variance,
}Expand description
Pluggable scoring function used by SelectKBest.
Each variant defines a different univariate statistical test for ranking features.
Variants§
FClassif
ANOVA F-value for classification (one-way between-groups F-test).
For each feature, groups samples by class label and computes
between-class variance / within-class variance. Higher F means the
feature is more discriminative. Requires target labels y.
FRegression
Univariate linear-regression F-statistic for regression.
For each feature j, computes the Pearson correlation r with the
target, then F = r^2 * (n-2) / (1 - r^2). Higher F means the
feature has a stronger linear relationship with the target.
Requires target values y.
Variance
Feature variance (unsupervised).
Simply uses the variance of each feature as its score.
Target y is ignored when this variant is used.
Trait Implementations§
Source§impl Clone for ScoringFunction
impl Clone for ScoringFunction
Source§fn clone(&self) -> ScoringFunction
fn clone(&self) -> ScoringFunction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScoringFunction
impl Debug for ScoringFunction
Source§impl<'de> Deserialize<'de> for ScoringFunction
impl<'de> Deserialize<'de> for ScoringFunction
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ScoringFunction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ScoringFunction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ScoringFunction
impl Serialize for ScoringFunction
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for ScoringFunction
impl RefUnwindSafe for ScoringFunction
impl Send for ScoringFunction
impl Sync for ScoringFunction
impl Unpin for ScoringFunction
impl UnsafeUnpin for ScoringFunction
impl UnwindSafe for ScoringFunction
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> SendAlias for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.