rmse {nnDiag}R Documentation

Root Mean Square Error

Description

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.

Usage

rmse(reference.set, predicted.set)

Arguments

reference.set vector of observed values
predicted.set vector or matrix of predicted values

Details

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.

Value

A vector of root mean square error value(s).

Author(s)

Brian Walters walte137@msu.edu

References

McRoberts, R.E. (2009) Diagnostic tools for nearest neighbors techniques when used with satellite imagery, Remote Sensing of Environment. 113, 489–499.

Examples

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

[Package nnDiag version 0.0-5 Index]