swh:1:snp:3a44eb759780145deea094ac2a25c5049546a085
Tip revision: 40311569a57dbc5cee79f7ccfee5ef4cf48006ea authored by Han Lin Shang on 23 August 2018, 05:44:27 UTC
version 4.9
version 4.9
Tip revision: 4031156
relmse.R
relmse <- function(forecast, forecastbench, true)
{
if (length(forecast) != length(true))
stop("RelMAE: the lengths of input vectors must be the same.")
ferror = mean((true - forecast)^2)
ferrorbench = mean((true - forecastbench)^2)
relativerror = ferror / ferrorbench
return(round(relativerror, 6))
}