pub struct AbsoluteLoss;Expand description
Mean Absolute Error loss for robust regression
Trait Implementations§
Source§impl Clone for AbsoluteLoss
impl Clone for AbsoluteLoss
Source§fn clone(&self) -> AbsoluteLoss
fn clone(&self) -> AbsoluteLoss
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 AbsoluteLoss
impl Debug for AbsoluteLoss
Source§impl LossFunction for AbsoluteLoss
impl LossFunction for AbsoluteLoss
Source§fn loss(&self, y_true: &Array1<Float>, y_pred: &Array1<Float>) -> Result<Float>
fn loss(&self, y_true: &Array1<Float>, y_pred: &Array1<Float>) -> Result<Float>
Compute the loss value for predictions
Source§fn loss_derivative(
&self,
y_true: &Array1<Float>,
y_pred: &Array1<Float>,
) -> Result<Array1<Float>>
fn loss_derivative( &self, y_true: &Array1<Float>, y_pred: &Array1<Float>, ) -> Result<Array1<Float>>
Compute the derivative of loss with respect to predictions
Source§fn loss_and_derivative(
&self,
y_true: &Array1<Float>,
y_pred: &Array1<Float>,
) -> Result<(Float, Array1<Float>)>
fn loss_and_derivative( &self, y_true: &Array1<Float>, y_pred: &Array1<Float>, ) -> Result<(Float, Array1<Float>)>
Compute both loss and derivative (often more efficient)
Source§fn is_classification(&self) -> bool
fn is_classification(&self) -> bool
Check if this is a classification loss (vs regression)
Auto Trait Implementations§
impl Freeze for AbsoluteLoss
impl RefUnwindSafe for AbsoluteLoss
impl Send for AbsoluteLoss
impl Sync for AbsoluteLoss
impl Unpin for AbsoluteLoss
impl UnwindSafe for AbsoluteLoss
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