Max error#
Captura el peor caso posible.
Se computa como:
\text{Max error}(y, \hat{y}) = \max(|y_i - \hat{y}_i|) = \max(|\hat{e}|)
[1]:
from sklearn.metrics import max_error
y_true = [3, 2, 7, 1]
y_pred = [4, 2, 7, 1]
max_error(
# -------------------------------------------------------------------------
# Ground truth (correct) target values.
y_true=y_true,
# -------------------------------------------------------------------------
# Estimated target values.
y_pred=y_pred,
)
[1]:
1