View source: R/caclulate_error.R
mae | R Documentation |
Function that calculates Root Mean Absolute Error (MAE)
mae(actual, predicted)
actual |
observed values |
predicted |
predicted values |
# Example data
actual <- c(4, 6, 9, 10, 4, 6, 4, 7, 8, 7)
predicted <- c(5, 6, 8, 10, 4, 8, 4, 9, 8, 9)
mae(actual, predicted)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.