MLmetrics (version 1.1.1)

MedianAE: Median Absolute Error Loss

Description

Compute the median absolute error regression loss.

Usage

MedianAE(y_pred, y_true)

Arguments

y_pred
Estimated target values vector
y_true
Ground truth (correct) target values vector

Value

Median Absolute Error Loss

Examples

data(cars)
reg <- lm(log(dist) ~ log(speed), data = cars)
MedianAE(y_pred = exp(reg$fitted.values), y_true = cars$dist)