knitr::opts_chunk$set(collapse = TRUE, comment = "#>", fig.align = "center") options(knitr.table.format = "html")
default_model <- SDMtune:::bm_maxent files <- list.files(path = file.path(system.file(package = "dismo"), "ex"), pattern = "grd", full.names = TRUE) predictors <- terra::rast(files)
In the previous articles you have learned how to prepare the data for the analysis, how to train a model and how to make predictions using SDMtune. In this article you will learn how to evaluate your model using three different metrics.
SDMtune
implements three evaluation metrics:
We will compute the value of the metrics on the training dataset, using the default model
that we trained in a previous article.
As usually we first load the SDMtune package:
library(SDMtune)
The AUC can be calculated using the function auc()
:
auc(default_model)
We can also plot the ROC curve using the function plotROC()
:
plotROC(default_model)
The TSS is computed with the function tss()
:
tss(default_model)
For the AICc we use the function aicc()
. In this case we need to pass to the env
argument the 'predictors' raster object that we created in the first article:
aicc(default_model, env = predictors)
Try to compute the three metrics using a model trained using the Maxnet method.
In this article you have learned:
In the next article you will learn two different strategies that can be used to correctly evaluate the model performance.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.