Automatically partitions data into bins for model training and testing, executes ecological niche models (ENMs) across a range of user-defined settings, and calculates evaluation metrics to help achieve a balance between goodness-of-fit and model complexity.
The ENMeval package (Muscarella et al. 2014) (1) automatically partitions data into training and testing bins using one of six methods (including several options for spatially independent partitions as well as user-defined bins), (2) executes a series of ENMs using Maxent (Phillips et al. 2006, Phillips et al. 2017) with a variety of user-defined settings (i.e., feature classes and regularization multipliers), conducting k-fold cross validation, and (3) calculates multiple evaluation metrics to aid in selecting model settings that balance model goodness-of-fit and complexity (i.e., "model tuning" or "smoothing").
ENMevaluate is the primary function of the ENMeval package, and multiple other functions highlighted below are called when it is run. The six options for partitioning occurrence data into training and testing (i.e., calibration and evaluation) bins are: n-1 jackknife, random k-fold, user-specified bins, and three explicit methods of masked geographically structured k-fold partitioning (see:
get.evaluation.bins). After model training, these bins are used to calculate five metrics of model performance for each combination of settings: model discrimination (AUC of test localities), the difference between training and testing AUC, two different threshold-based omission rates, and the small sample-size corrected version of the Akaike information criterion (AICc), the latter using the unpartitioned dataset. A model prediction (as a raster layer) using the full (unpartitioned) dataset is generated for each combination of feature class and regularization multiplier settings. Similarity of these models in geographic space (i.e., "niche overlap") can be calculated to better understand how model settings change predictions (see
calc.niche.overlap). The results of
ENMevaluate are returned as an object of class
ENMevaluation-class. A basic plotting function (
eval.plot) can be used to visualize how evaluation metrics depend on model settings.
- As of version 0.3.0 -
ENMevaluate runs the the Maxent algorithm by calling the maxnet package (Phillips et al. 2017) instead of the previous implementation that relied on the 'maxent.jar' Java program called by the dismo package. This is controlled by the new argument,
algorithm='maxnet'. A major advantage of this change is that it removes the reliance on Java and the rJava package, which is great but can sometimes cause confusing problems on different computers. Our team has done some fairly extensive testing to ensure this implementation gives the expected results but the maxnet implementation is relatively new (at the time of writing this) and we encourage users to scrutinize their results.
There are some differences between the 'maxnet' and 'maxent.jar' algorithms that may lead to slight numeric differences in the results (at least when
hinge feature classes are used). See Phillips et al. (2017) and Phillips (2017) for more details. Additionally, the 'maxnet' algorithm does not provide information on variable importance (from the
var.importance() function) because of differences in the underlying models. Users can still choose to use the 'maxent.jar' implementation by setting
algorithm='maxent.jar' in the
ENMevaluate function (also see note below).
- As of version 0.2.0 -
ENMevaluate includes an option for parallel computing. Setting
parallel = TRUE can significantly speed up processing time, particularly for large analyses. For very small analyses, it may actually take longer than running with
parallel = FALSE.
Currently, ENMeval only implements the Maxent algorithm (via either the 'maxent.jar' or 'maxnet' implementations), but we eventually plan to expand it to work with other algorithms. All calculations are based on the raw Maxent output (i.e., not logistic or cumulative transformations) and users can choose whether to use 'clamping' (see Maxent documentation for details on this option). Additionally, Maxent models are run with the arguments:
noremoveDuplicates. Users should consult Maxent documentation (Phillips et al. 2006) and other references (e.g., Phillips and Dudik 2008) for more information on these options. We note that interested users can edit the source code of
ENMeval (in particular, the
tuning functions) if they desire to change these or other options.
When using the 'maxent.jar' implementation (not default as of version 0.3.0),
ENMevaluate directly uses several functions from the dismo package (Hijmans et al. 2011). Most importantly, the
maxent function that runs the Maxent algorithm (Phillips et al. 2006) in Java. Before running this command, the user must first download Maxent from this website. Then, place the file 'maxent.jar' in the 'java' folder of the dismo package. The user can locate that folder by typing:
system.file("java", package="dismo"). For additional details, users should consult the documentation of the dismo package (or just use the newer [default] maxnet implementation).
Robert Muscarella, Peter J. Galante, Mariano Soley-Guardia, Robert A. Boria, Jamie M. Kass, Maria Uriarte and Robert P. Anderson
Maintainer: Robert Muscarella <firstname.lastname@example.org>
Hijmans, R. J., Phillips, S., Leathwick, J. and Elith, J. 2011. dismo package for R. Available online at: https://cran.r-project.org/package=dismo.
Muscarella, R., Galante, P. J., Soley-Guardia, M., Boria, R. A., Kass, J. M., Uriarte, M., and Anderson, R. P. 2014. ENMeval: An R package for conducting spatially independent evaluations and estimating optimal model complexity for Maxent ecological niche models. Methods in Ecology and Evolution, 5: 1198-1205.
Phillips, S. J. 2017. maxnet package for R. Available online at: https://CRAN.R-project.org/package=maxnet.
Phillips, S. J., Anderson, R. P., Dudík, M., Schapire, R. E. and Blair, M. E. 2017. Opening the black box: an open-source release of Maxent. Ecography, 40: 887–893.
Phillips, S. J., Anderson, R. P., and Schapire, R. E. 2006. Maximum entropy modeling of species geographic distributions. Ecological Modelling, 190: 231-259.
Phillips, S. J., and Dudik, M. 2008. Modeling of species distributions with Maxent: new extensions and a comprehensive evaluation. Ecography, 31: 161-175.
maxnet in the maxnet package
maxent in the dismo package
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.