powered by
Calculates weighted mean absolute percentage error of predicted values. The smaller, the better.
mape(actual, predicted, w = NULL, ...)
Strictly positive observed values.
Predicted values.
Optional case weights.
Further arguments passed to weighted_mean.
weighted_mean
A numeric vector of length one.
# NOT RUN { mape(1:10, c(1:9, 12)) mape(1:10, c(1:9, 12), w = rep(1, 10)) mape(1:10, c(1:9, 12), w = 1:10) # }
Run the code above in your browser using DataLab