GMSummary: Geometric mean for model evaluation

Description Usage Arguments Value Author(s) References See Also Examples

Description

Provides functionality to evaluate a model using the gemetric mean as described in Galar et al., 2014. The function can be used in caret's train and CAST'S ffs to select variables based on the geometric mean.

Usage

1
GMSummary(data, lev = NULL, model = NULL)

Arguments

data

a data frame with columns obs and pred for the observed and predicted outcomes.

lev

a character vector of factors levels for the response.

model

a character string for the model name (as taken from the method argument of train.

Value

A vector of geometric mean performance estimates.

Author(s)

Hanna Meyer, Jannis Gottwald, Thomas Nauß

References

See Also

train,codetrainControl,ffs, defaultSummary

Examples

1
2
3
4
5
6
7
## Not run: 
data(iris)
ctrl <- trainControl(method="cv",summaryFunction = GMSummary)
model <- train(iris[,1:4],iris$Species,trControl=ctrl,metric="GM")
model

## End(Not run)

HannaMeyer/sptm documentation built on May 15, 2019, 4:29 p.m.