mae {liver} | R Documentation |
Mean Absolute Error (MAE)
Description
Computes mean absolute error.
Usage
mae(pred, actual, weight = 1, na.rm = FALSE)
Arguments
pred |
a numerical vector of estimated values. |
actual |
a numerical vector of actual values. |
weight |
a numerical vector of weights the same length as |
na.rm |
a logical value indicating whether NA values in |
Value
the computed mean squared error (numeric value).
Author(s)
Reza Mohammadi a.mohammadi@uva.nl and Kevin Burke kevin.burke@ul.ie
See Also
Examples
pred = c(2.3, -1.4, 0, 3.45)
actual = c(2.1, -0.9, 0, 2.99)
mae(pred, actual)
[Package liver version 1.18 Index]