Description Usage Arguments Details Value Note See Also Examples
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.
1 |
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 |
The function returns a named list of the various accuracy and variable importance metrics:
Accuracies
contains the complete names list returned by classAcc
; see the help on that method for more
information on that data structure.
VIMP
a named list containing the variable importance matrices (VIMP) for each included model. Each entry in the list is a
data frame in which columns are different classes and rows are different input variables; specific entries represent the variable
importance of a given input variable on a particular class.
VIMPoverall
a data.frame showing the overall variable importance (VIMP) for a given model.
Columns are different models and entries in the table are the standardized VIMP for an input variable on that model. Values have been standardized by column so they are (somewhat) comparable as the algorithm by which VIMP is computed varies by model–hence the largest value will be 1 in every column. This makes the columns approximately comparable, however, values should be taken with a grain of salt, and perhaps rank order is the most robust comparison.
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:
confMatrix
= confusion matrix
userAcc
= user accuracy
prodAcc
= producer accuracy
overallAcc
= overall accuracy
kappa
= kappa
VIMP
= VIMP matrices
VIMPoverall
= overall VIMP
For continuous data:
overallAcc
= overall r-squared
mse
= mean squared error
See the details section of npelVIMP
for a discussion of the limitations of our VIMP metric.
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.