Compute mean absolute percentage error
Takes in actual and predicted linear response, and returns MAPE value
mape(y, yhat)
y |
actual linear response |
yhat |
predicted linear response |
mape
calculates the mean absolute percentage error in a predicted linear
response.
mean absolute percentage error
Akash Jain
# A 'data.frame' with y and yhat df <- data.frame(y = c(1.5, 2, 3.2), yhat = c(3.4, 2.2, 2.7)) # Compute mape MAPE <- mape(y = df[, 'y'], yhat = df[, 'yhat'])
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.