testAUC | R Documentation |
For a given model, testAUC
calculates the Area Under the Curve (AUC)
of the Receiver Operating Characteristic (ROC) as a threshold-independent
measure of binary classification performance. This function is intended to be
used with occurrence data that is independent from the data used to train the
model, to obtain an unbiased measure of model performance.
testAUC(model, transformations, data, plot = TRUE, ...)
model |
The model to be projected. This may be the object returned by
|
transformations |
Transformation functions used to create the derived
variables in the model. I.e. the 'transformations' returned by
|
data |
Data frame containing test occurrence data in the first column
and corresponding explanatory variables in the model in subsequent columns.
The test data should be coded as: 1/0/NA, representing presence, absence,
and uninformed. See |
plot |
Logical. Plot the ROC curve? |
... |
Arguments to be passed to
Note that some graphical parameters may return errors or warnings if they cannot be changed or correspond to multiple elements in the plot. |
If plotted, the point along the ROC curve where the discrimination threshold is PRO = 1, is shown for reference.
## Not run:
# From vignette:
grasslandPA <- readData(
occurrence = system.file("extdata", "occurrence_PA.csv", package="MIAmaxent"),
contEV = system.file("extdata", "EV_continuous", package="MIAmaxent"),
catEV = system.file("extdata", "EV_categorical", package="MIAmaxent"),
PA = TRUE, XY = TRUE)
head(grasslandPA)
tail(grasslandPA)
testAUC(model = grasslandmodel, transformations = grasslandDVs$transformations,
data = grasslandPA)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.