gmGeostats (version 0.10-6)

xvErrorMeasures: Cross-validation errror measures

Description

Compute one or more error measures from cross-validation output

Usage

xvErrorMeasures(x, ...)

# S3 method for data.frame xvErrorMeasures( x, observed = x$observed, output = "MSDR1", univariate = length(dim(observed)) == 0, ... )

# S3 method for DataFrameStack xvErrorMeasures( x, observed, output = "ME", univariate = length(dim(observed)) == 0, ... )

Arguments

x

a dataset of predictions (if x is of class "data.frame") or simulations (if x is of class "DataFrameStack")

...

extra arguments for generic functionality

observed

a vector (if univariate) or a matrix/dataset of true values

output

which output do you want? a vector of one or several of c("ME","MSE","MSDR","MSDR1","MSDR2","Mahalanobis")

univariate

logical control, typically you should not touch it

Value

If just some of c("ME","MSE","MSDR","MSDR1","MSDR2") are requested, the output is a named vector with the desired quantities. If only "Mahalanobis" is requested, the output is a vector of Mahalanobis square errors. If you mix up things and ask for "Mahalanobis" and some of the quantities mentioned above, the result will be a named list with the requested quantities. (NOTE: some options are not available for x a "DataFrameStack")

Functions

  • xvErrorMeasures: Cross-validation errror measures

  • xvErrorMeasures.DataFrameStack: Cross-validation errror measures

Details

"ME" stands for mean error (average of the differences between true values and predicted values), "MSE" stands for mean square error (average of the square differences between true values and predicted values), and "MSDR" for mean squared deviation ratio (average of the square between true values and predicted values each normalized by its kriging variance). These quantities are classically used in evaluating output results of validation excercices of one single variable. For multivariate cases, "ME" (a vector) and "MSE" (a scalar) work as well, while two different definitions of a multivariate mean squared deviation ratio can be given:

  • "MSDR1" is the average Mahalanobis square error (see accuracy() for explanations)

  • "MSDR2" is the average univariate "MSDR" over all variables.

See Also

Other accuracy functions: accuracy(), mean.accuracy(), plot.accuracy(), precision(), validate()