pub enum ObjectiveError {
InvalidInput(String),
ComputationError(String),
ConfigError(String),
SerializationError(String),
}Expand description
Errors that can occur during objective function operations.
This error type covers all failure modes when working with objective functions, including invalid input data, computation failures, configuration issues, and serialization problems.
Variants§
InvalidInput(String)
Input data is invalid for the objective function.
This includes mismatched array lengths, non-finite values, or target values outside the valid range (e.g., non-binary targets for classification).
ComputationError(String)
An error occurred during loss/gradient computation.
This typically indicates numerical instability or overflow/underflow issues.
ConfigError(String)
Objective configuration is invalid or missing required parameters.
SerializationError(String)
Serialization or deserialization of objective configuration failed.
Trait Implementations§
Source§impl Debug for ObjectiveError
impl Debug for ObjectiveError
Source§impl Display for ObjectiveError
impl Display for ObjectiveError
Source§impl Error for ObjectiveError
impl Error for ObjectiveError
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<ObjectiveError> for GBRTError
impl From<ObjectiveError> for GBRTError
Source§fn from(source: ObjectiveError) -> Self
fn from(source: ObjectiveError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ObjectiveError
impl RefUnwindSafe for ObjectiveError
impl Send for ObjectiveError
impl Sync for ObjectiveError
impl Unpin for ObjectiveError
impl UnwindSafe for ObjectiveError
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