MAE: Mean Absolute Error Loss

View source: R/Regression.R

MAER Documentation

Mean Absolute Error Loss

Description

Compute the mean absolute error regression loss.

Usage

MAE(y_pred, y_true)

Arguments

y_pred

Estimated target values vector

y_true

Ground truth (correct) target values vector

Value

Mean Absolute Error Loss

Examples

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

yanyachen/MLmetrics documentation built on April 16, 2024, 7:48 a.m.