[R-sig-Geo] Relative Mean Error for comparing interpolation methods
Seyed Jalil Alavi
sja_sari at yahoo.com
Fri Nov 13 09:58:55 CET 2015
Dear All
I am comparing kriging and IDWmethods in mapping Forest Site Productivity
using10-fold cross validation.
Bothkriging and IDW methods produced negative mean error. Now I want to use
relativemean error for comparing these methods other than RMSE and mean absolute error.
here is the results of kriging;
mean ofresponse variable: 34.76982
meanerror: -0.03613827
meanabsolute error: 1.598008
RMSE:2.053376
how can Icalculate relative mean error?
I readsomewhere we can use this function for calculating relative mean
errorhighlighted with red color:
OK_CV<- krige.cv(Site_Form ~1, ~X+Y, Data, model = model1.out, nfold=10)
# meanerror, ideally 0:
ME_OK<- mean(OK_CV$observed - OK_CV$ var1.pred)
ME_OK
### MeanAbsolutely Error
MAE_OK<- mean(abs(OK_CV$residual))
MAE_OK
###Relative Mean Error
MEr_OK<- (ME_OK/mean(Data$Site_Form))*100
MEr_OK
### RMSE
RMSE_OK<- sqrt(mean(OK_CV$residual^2))
RMSE_OK
###Relative RMSE
RMSEr_OK<- (RMSE_OK/mean(Data$Site_Form))*100
RMSEr_OK
if I use theabove function for relative mean error, the result will be negative!!!
I wouldbe very grateful if anyone can help me to calculate
relativemean error in R.
Regards
SJA
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list