pub enum CriterionError {
InvalidInput(String),
InsufficientSamples {
samples: usize,
min: usize,
},
}Expand description
Split criteria Errors that can occur during split criterion computation.
These errors cover invalid inputs, insufficient samples, and numerical issues that prevent proper calculation of split quality.
Variants§
InvalidInput(String)
Input data is invalid for computation.
This includes mismatched array lengths, non-finite values, or other data integrity issues that violate the criterion’s preconditions.
InsufficientSamples
Not enough samples to perform a meaningful split.
This error is returned when a node or split candidate has fewer samples than the minimum required for stable statistical estimation.
Trait Implementations§
Source§impl Debug for CriterionError
impl Debug for CriterionError
Source§impl Display for CriterionError
impl Display for CriterionError
Source§impl Error for CriterionError
impl Error for CriterionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<CriterionError> for TreeError
impl From<CriterionError> for TreeError
Source§fn from(source: CriterionError) -> Self
fn from(source: CriterionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CriterionError
impl RefUnwindSafe for CriterionError
impl Send for CriterionError
impl Sync for CriterionError
impl Unpin for CriterionError
impl UnwindSafe for CriterionError
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> 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