Trait MeanAbsoluteError

Source
pub trait MeanAbsoluteError {
    type Output;

    // Required method
    fn mae(&self) -> Self::Output;
}
Expand description

Compute the mean absolute error (MAE) of the object; more formally, we define the MAE as the average of the absolute differences between the predicted and actual values:

Err = \frac{1}{n} \sum_{i=1}^{n} |y_i - \hat{y}_i|

Required Associated Types§

Required Methods§

Source

fn mae(&self) -> Self::Output

Implementations on Foreign Types§

Source§

impl<A, S, D> MeanAbsoluteError for ArrayBase<S, D>
where A: Float + FromPrimitive + ScalarOperand, D: Dimension, S: Data<Elem = A>,

Source§

type Output = A

Source§

fn mae(&self) -> Self::Output

Implementors§