modelAccs: Generate accuracy statistics and variable importance for a...

Description Usage Arguments Details Value Note See Also Examples

Description

Given a list of models, this function runs classAcc and npelVIMP on each. See details for a description of how the data is encapsulated for return.

Usage

1
modelAccs(models, VIMP = TRUE, ...)

Arguments

models

is either a list of model objects on which to find error statistics, or a single model to evaluate.

VIMP

(optional) should we attempt to append the VIMP data; defaults to TRUE

...

(optional) other parameters to pass to classAcc and/or npelVIMP.

Details

The function returns a named list of the various accuracy and variable importance metrics:

Value

This function returns different values depending on whether the model is categorical or continuous. For categorical data it returns a named list of accuracy and VIMP statistics:

For continuous data:

Note

See the details section of npelVIMP for a discussion of the limitations of our VIMP metric.

See Also

classAcc for more on continuous and categorical accuracies, and npelVIMP for more on how that metric is computed and it's limitations. Also see modelsValid for a function to compute accuracies using an independent dataset.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Categorical Data
data ('siteData')
modelRun <- generateModels (data = siteData,
                            modelTypes = suppModels,
                            x = c('brtns','grnns','wetns','dem','slp','asp','hsd'),
                            y = 'ecoType',
                            grouping = ecoGroup[['domSpecies','transform']],
                            echo = FALSE)
mE <- modelAccs (modelRun, ecoGroup[['domSpecies','labels']])
str(mE,1)

# Continuous Data
modelRun <- generateModels (data = siteData,
                            modelTypes = contModels,
                            x = c('brtns','grnns','wetns','dem','slp','asp','hsd'),
                            y = 'easting',
                            echo = FALSE)
mE <- modelAccs (modelRun)
str(mE,1)

henkelstone/NPEL.Classification documentation built on May 17, 2019, 3:42 p.m.