pub enum FeatureSelectionError {
EmptyInput,
NoFeatures,
RaggedRows,
NonFinite,
InvalidThreshold,
LabelLengthMismatch,
TooFewClasses,
DegenerateClasses,
}Expand description
Errors that prevent a selector from scoring a feature matrix.
Returned (never panicked) so callers stay clear of the crate’s unwrap/panic
lint gate and can surface a clean diagnostic.
Variants§
EmptyInput
The feature matrix had no samples (no rows), so nothing can be scored.
NoFeatures
The matrix had rows but no feature columns, so there is nothing to select.
RaggedRows
The rows had differing feature counts (a ragged matrix), so columns are undefined.
NonFinite
A matrix entry was non-finite (NaN or ±∞), which has no valid score.
InvalidThreshold
The supplied threshold was not finite, so the keep rule would be ill-defined.
LabelLengthMismatch
The label vector’s length did not match the number of samples (rows).
TooFewClasses
Fewer than two distinct classes were present, so a between-class F-test is undefined.
DegenerateClasses
A class had fewer observations than the F-test requires, or the within-class variation was zero, so the ANOVA F-statistic is undefined.
Trait Implementations§
Source§impl Clone for FeatureSelectionError
impl Clone for FeatureSelectionError
Source§fn clone(&self) -> FeatureSelectionError
fn clone(&self) -> FeatureSelectionError
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 FeatureSelectionError
impl Debug for FeatureSelectionError
Source§impl Display for FeatureSelectionError
impl Display for FeatureSelectionError
impl Eq for FeatureSelectionError
Source§impl Error for FeatureSelectionError
impl Error for FeatureSelectionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for FeatureSelectionError
impl PartialEq for FeatureSelectionError
Source§fn eq(&self, other: &FeatureSelectionError) -> bool
fn eq(&self, other: &FeatureSelectionError) -> bool
self and other values to be equal, and is used by ==.