rmse {nnDiag} | R Documentation |
Given a reference set of continuous variable observations and a set of corresponding predictions, this function will calculate the root mean square error of the classification.
rmse(reference.set, predicted.set)
reference.set |
vector of observed values |
predicted.set |
vector or matrix of predicted values |
The predicted.set
may be a vector if there is only one
classification to find RMSE for, or a matrix if there is multiple
classifications. For example, if kNN classifications were run using
the same reference set with multiple values of k.
A vector of root mean square error value(s).
Brian Walters walte137@msu.edu
McRoberts, R.E. (2009) Diagnostic tools for nearest neighbors techniques when used with satellite imagery, Remote Sensing of Environment. 113, 489–499.
data(LuceVolume) ##Using one predicted set x <- rmse(LuceVolume$ref.volume, LuceVolume$pred.vol_k18) x ##Using multiple predicted sets x <- rmse(LuceVolume$ref.volume, as.matrix(LuceVolume[,4:9])) x