search for: smapeper

Displaying 2 results from an estimated 2 matches for "smapeper".

Did you mean: mapper
2012 May 31
0
function to calculate a SMAPE (Symmetric mean absolute percentage error) to avoid the possibility of an inflation caused by zero values in the series
...www.stat.iastate.edu/preprint/articles/2004-10.pdf I wrote a function but I wish eventually correct error, change or improve with your suggestions. Please feel free to add comments or remarks because I am not a mathematicians and probably i wrong to write this function Thanks in advance Gianni SMAPEper <- function(x,y){mean((200*(abs(x-y)))/(x+y))} obs <- c(10,20,0,40) pred <-c(5,6,0,8) SMAPEper(obs,pred) msSMAPE <- function(obs,pred){ M <- numeric(length(obs)) for (i in 2:length(obs)) { n <- i-1 M[i] <- mean(obs[1:n]) } sum1 <- (abs...
2012 Jun 01
0
help to find or fix a SMAPE (Symmetric mean absolute percentage error ) with correction to avoid zero value in the series
...gth i tried to create a function but without a good result. For this reason I wish to know if some reserchers develop a solution to avoid the possibility of an inflation of sMAPE caused by zero values in the series. Thanks in advance Gianni # this is my mSMAPE function but there is some problem SMAPEper <- function(x,y){mean((200*(abs(x-y)))/(x+y))} obs <- c(10,20,30,40) pred <-c(5,6,7,8) mSMAPE <- function(obs,pred){ M <- numeric(length(obs)) for (i in 2:length(obs)) { n <- i-1 M[i] <- mean(obs[1:n]) } sum1 <- (abs(obs[1]-pred[1]))/(0.5...