powered by
Computes mean absolute error.
mae(pred, actual, weight = 1, na.rm = FALSE)
the computed mean squared error (numeric value).
a numerical vector of estimated values.
a numerical vector of actual values.
a numerical vector of weights the same length as pred.
pred
a logical value indicating whether NA values in pred should be stripped before the computation proceeds.
Reza Mohammadi a.mohammadi@uva.nl and Kevin Burke kevin.burke@ul.ie
mse
pred = c(2.3, -1.4, 0, 3.45) actual = c(2.1, -0.9, 0, 2.99) mae(pred, actual)
Run the code above in your browser using DataLab