R package for automated tuning and evaluations of ecological niche models
ENMeval
is an R package that performs automated tuning and evaluations of ecological niche models / species distribution models. These models make predictions of species’ niche relationships and potential geographic distributions based on presence data, environmental predictor variables, and a sample of available environmental conditions (i.e., background data).
“Model tuning” is commonly used for machine-learning models. It means building candidate models with a range of complexity settings, evaluating the accuracy of each one (here with cross-validation), then selecting optimal settings for your data based on those of the best-performing model. This exercise is important because it is difficult to predict in advance how complex your model needs to be to make accurate and ecologically realistic predictions for your species. Too much model complexity leads to overfitting, where your model fits your data very well but it cannot predict new data accurately. Model tuning helps maximize predictive ability while avoiding model overfitting.
The ENMeval
package features a single function that performs model tuning based on user specifications, including methods for partitioning data for cross-validation (random, leave-one-out, spatial, custom), and evaluates models using predefined performance metrics (AUC, Continuous Boyce Index, omission rates) with the option to insert others. The package includes functionality for three models: maxent.jar (Java implementation of Maxent), maxnet (R implementation of Maxent), and BIOCLIM (climate envelope method). Users can also specify other algorithms by customizing an ENMdetails object (?ENMdetails
). The package also offers comprehensive metadata output, null model evaluations, visualization tools, and an extensive tutorial that walks you through a full analysis workflow. Many features in ENMeval
were created in response to user requests – thank you for your input! Version >=2.0.0 represents an extensive restructure and expansion of previous versions, and 2.0.5 is a big move from raster
and dismo
functions to those of terra
and predicts
.
For a more detailed description of ENMeval
, please reference the most recent publication:
For the original package version, please reference this older publication:
NOTES:
ENMeval
is a work in progress, changing slowly to fix bugs when users identify them. If you find a bug, please raise an Issue in this Github repo and I will resolve it as soon as I can. The CRAN version may lag behind the Github one, so please try the development version here first if you are having any issues. Install with:devtools::install_github("jamiemkass/ENMeval")
The vignette is not included in the CRAN version of the package due to file size constraints, but is available on the package’s Github Pages website.
Please make sure to use the most recent version of maxent.jar , as bug fixes are occasionally made.
Note that as of version 0.3.0, the default implementation uses the ‘maxnet’ R package. The output from this differs from that of the original Java program and so some features are not compatible (e.g., variable importance, html output).