calculate_mue#

cinnabar.stats.calculate_mue(y_true: ndarray, y_pred: ndarray) float[source]#

Compute mean unsigned error between true and predicted values.

Note

The MUE is calculated as:

\[MUE = \frac{1}{N} \sum_{i=1}^N |y_i - \hat{y}_i|\]

where \(y_i\) is the predicted value and \(\hat{y}_i\) is the true value.

Parameters:
  • y_true (ndarray with shape (N,)) – True values

  • y_pred (ndarray with shape (N,)) – Predicted values

Returns:

mue – MUE between true and predicted values

Return type:

float