mae: Mean Absolute Error

Description Usage Arguments Value Author(s) Examples

Description

mtr_mean_absolute_error is a measure of difference between the predicted value and the true value.

Usage

1
2
3
mtr_mean_absolute_error(actual, predicted)

mtr_mae(actual, predicted)

Arguments

actual

[numeric] The ground truth numeric vector.

predicted

[numeric] The predicted numeric vector, where each element in the vector is a prediction of the corresponding elements in actual.

Value

A numeric scalar output

Author(s)

An Chu

Examples

1
2
3
4
act <- c(3, -0.5, 2, 7)
pred <- c(2.5, 0.0, 2, 8)
mtr_mean_absolute_error(act, pred)
mtr_mae(act, pred)

chuvanan/metrics documentation built on Nov. 4, 2019, 8:52 a.m.