Introduction 

Maxent, which stands for maximum entropy modelling, predicts species occurrences by finding the distribution that is most spread out or closest to uniform, while the limits of the environmental variables of known locations. 

Maxent only uses presence data. The algorithm compares the locations of where a species has been found to environmental data available in the study region. It defines these available environments by sampling a large number of points throughout the study area, referred to as background points. Background points can include locations where the species is known to occur and define the available environment. Background points are not the same as pseudo-absence points. Pseudo-absence locations can be where a species is suspected not to occur, for example in locations where species with similar habitat requirements were detected, but the target species was not. Pseudo-absence locations may also be random locations where the target species was not detected in the available dataset, i.e. random, disk, and SRE options in the EcoCommons modeling wizard. Background points are locations that are meant to be numerous enough (the default is 10,000 points) to capture the full environmental space of the study area. The Maxent algorithm developed for species distribution modelling is a machine learning method and thus iteratively builds multiple models. It has two main components: 

  1. Entropy: the model is calibrated to find the most spread-out distribution, or closest to uniform, throughout the study region. 
  2. Constraints: the rules that constrain the predicted distribution, based on the values of the environmental variables (called features) of the locations where the species has been observed. 

 

Maxent considers six types of features, each of which allows a different possible shape of the response curves, and has different implications for the constraints (Figure 1). As a default, Maxent uses all feature types, but you can choose to build simpler models by only using a few of these. 

  
 

Figure 1. Description of the kinds of feature types that are used to define constraints. The default is to try. All feature types when building a model unless sample size is insufficient for some types, in which case those types are by default excluded. 

 

To calculate the potential distribution of a species, Maxent calculates two probability densities. The probability density for all presence points describes the relative likelihood of all environmental variables in the model over the range of those points. For example, in Figure 2, temperature and rainfall values under the peak in the graph on the right were the most common values across all values of the presence points in the environment. Similarly, a probability density is calculated across the entire study region based on the background points. Thus, the probability density of the background points characterizes the available environment within the study region, whereas the probability density of the presence points characterizes the environment where a species has been found. Maxent then calculates the ratio between these two probability densities, which gives the relative environmental suitability for the presence of a species for each point in the study area.  

 

Figure 2. Depiction of how Maxent defines the probability density functions for both presence locations and background points. 

Maxent chooses the distribution that maximizes the similarity between the environmental characteristics of the total environment and those of the locations where the species is known to be present. This is known as the raw output of Maxent. For a more straightforward interpretation of the results, and to provide an estimate of the probability that a species is present at a given location, Maxent performs a logistic transformation of the raw output. The logistic output takes into account the prevalence of a species, which refers to the proportion of occupied locations. Maxent uses a default prevalence value of 0.5, which implies that the species is present in half of all the possible locations. We advise caution with this default value as the exact prevalence cannot be derived from presence-only data. The default value of 0.5 is for example not appropriate for rare species. 

An important aspect of Maxent is regularization, which reduces the overfitting of the model. Regularization is done in two ways: 

3. Relaxing the constraints: instead of fitting the model using the exact constraints (means, variances etc.) of the environmental variables, it takes into account confidence intervals around the constraints. This prevents the model from being fitted too closely around the input data.
4. Penalizing complexity: the model excludes feature types that do not add a significant improvement to the model. 

Advantages 

  • Requires only presence data; 
  • Can use both continuous and categorical predictor variables; 
  • Includes interactions between predictor variables; 
  • Includes a regularization protocol to protect against overfitting; 
  • Generally, shows good predictive performance. 

Limitations 

  • It is difficult to compare the output with other algorithms, as Maxent output gives environmental suitability rather than predicted probability of occurrence; 
  • Maxent's logistic output relies on an assumption, not an estimation, of prevalence. 

Assumptions 

Maxent by default assumes that prevalence is 0.5, which is not always appropriate. 

Requires absence data 

No. 

Maxent needs to run more than once to check results 

Scientific publications using Maxent models require authors to validate their results.  The best way to validate results is to see how well the model predicts the locations of independent data  not used to create the model being evaluated (Phillips and Dudik 2008, Radosavljevic and Anderson 2013). If using ALA data, you might be able to identify a source of data that was collected using a different methodology, then make sure those data are not used to train the model but are used to test the model. A growing number of datasets, such as tracking data, ecoacoustic data, or camera trap data, are other good sources of independent data that can be used for validation. An example of evaluation statistics from independent data is available in step 4of the SDMs in R module.  

If independent data are unavailable for validation, one of three options should be employed.  

  1. Cross-validation.  This method breaks your dataset into partitions of equal size. For example, if you selected 10-fold cross-validation on a dataset of 1000 records, your dataset would be broken into 10 groups of 100 records.  Then, for each run, one 100 record “fold” is excluded and used as test data, while the remaining 900 records are used to generate or ‘train’ the model. If the number of records is lower than the number of folds you want to use, your model will fail. Often this method is preferred when there are larger numbers of occurrence data. 
  2. Boot-strapping. as implemented in Maxent is sampling with replacement. The user defines the random test percentage, which is the percentage of records that will be left out during each model run. Then the number of replicates represents how often this process will be repeated, keeping in mind that after 5% of records are randomly left out in one run of the model, those records are ‘replaced’ into the main dataset. The next run will randomly select another 5% of records, and that might repeatedly leave out some of the records previously left out. By adjusting the percentage of records to be left out and the number of replicates, boot-strapping highlights how results change as either influential data or unhelpful data that are left out of individual runs. 
  3. Subsampling in Maxent represents sampling without replacement. For example, once 5% is removed from the dataset to conduct a run, it is not available to be selected in subsequent runs where an additional 5% is removed. 

Maxent, like all machine learning algorithms, uses stochastic learning to generate a model. This means  there is a random process in the modelling, so subsequent runs of a machine learning algorithm often produce slightly different results depending on the random number used to start these processes. If there are strong relationships in the underlying data, the differences in results from one run to the next will be relatively small. However, it is possible to get substantial differences in results from a machine learning algorithm like Maxent even when using exactly the same data and model arguments in subsequent runs. If teaching or sharing results where you want others to generate the same result, it is important to set the same number of seed.. All of the validation methods above capture the variation in results related to using different subsets of data. If you want to include the error associated with the stochastic learning process, you need to set the model argument “”. 

Benefits of modifying background data 

When your data has sample bias, like when the presence data is not representative, selecting background data that matches the sampling bias has been shown to result in better predictions of suitable locations. This can be done by selecting background data from a bias layer or using targeted background data (data collected for similar species with the same method but where the target species was not identified). Similarly, large areas often require more than 10,000 background points (Phillips and Dudik 2008, Kramer‐Schadt et al. 2013, Lissovsky et al. 2021El-Gabbas et al. 2021, Barber et al. 2022). If randomly selecting background points, “writing background predictions” can allow you to assess if more background points are needed to ensure a representative sample of environmental variables.  

Examples of ways to generate bias layers or targeted background data can be found in modules 1 & 3 of the SDM in R modules. Selecting background points within a range of distances around the presence locations is also an effective way to reduce bias (Barber et al. 2022). Be careful to select enough background grid-cells (10,000 +) within the specified distance range from presence locations. 

Benefits of thinning presence data 

When there are many presence locations in a dataset, and those locations are clustered, thinning records in geographic space based on a measure of spatial autocorrelation can also significantly improve predictions (Kramer‐Schadt et al. 2013, Lissovsky et al. 2021). 

 

Configuration options 

 

EcoCommons uses the Maxent software https://biodiversityinformatics.amnh.org/open_source/maxent/   EcoCommons allows the user to set model arguments as specified below. 

 

Argument 

Default value 

Argument description 

Configuration for Maxent 

Literature from the EcoCommons support article provides detail on when you might adjust these default arguments, many of which are set to the same default values as in the R package used to run these models. 

 

random_seed 

 

NULL 

Seed used for generating random values. Using the same seed value, i.e. 123, ensures that running the same model, with the same data and settings generates the same result, despite stochastic processes such as machine learning or cross-validation. 

Random seed 

FALSE 

If “TRUE” selected, a different random seed will be used for each run, so a different random test/train partition will be made and a different random subset of the background will be used, if applicable. If “FALSE” the variation related to running the model on different subsets of data is captured, if “TRUE” the additional variation related to stochastic learning is also included. 

Null random model repetitions 

1 

Increase this number to generate the number of repeated random subsets of data used to generate enough AUC values to understand the distribution of AUC values one might expect to have reported by chance. This is an interesting way to statistically test if the AUC model result from training data is significantly different than expected from a random selection of the experiment’s environmental data (Raes & Steege 2007). 

Remove duplicates 

TRUE 

Remove duplicate presence records. If environmental data are in spatial grids, duplicates are records in the same grid cell, which may or may not have identical geographic coordinates. It is almost always a good idea to remove these duplicate records that would have identical environmental values. 

Maximum background points 

10,000 

The number of background points. If the number of background points/ grid cells is larger than this number, then this number of cells is chosen randomly to generate background points. Adjusting this value can improve results (Phillips & Dudik 2008Renner & Warton 2013, El-Gabbas et al. 2021Barber et al. 2022), also, A global extent would usually need more than 10,000 background points. 

Add samples to background 

TRUE 

Add to the background any sample which has a combination of environmental values that isn’t already present in the background. 

Add all samples to background 

FALSE 

Add all samples to the background, even if they have combinations of environmental values that are already present in the background. 

Allow partial data 

FALSE 

During model training, allow use of samples that have no-data values for one or more environmental variables. 

Jackknife 

FALSE 

Measure importance of each environmental variable by training with each environmental variable first omitted, then used in isolation (Phillips 2005). 

Random test points 

0 

Percentage of presence localities to be randomly set aside as test points, used to compute AUC, omission etc. Used to specify the percentage for boot-strapping or subsampling. If using cross-validation this value should be left at the default value of 0. 

Replicates 

1 

Number of folds to do if using cross-validation, or number of replicates to run if using boot-strapping or subsampling. If replicates left =1, no cross-validation, bootstrapping or subsampling will be done.  

Replicate type 

crossvalidate 

If replicates > 1, do multiple runs of this type. 

Crossvalidate = cross-validation where your presence data is divided into equal-sized partitions by dividing by the number of replicates or folds in the argument above, each fold is used in turn for test data. 

Bootstrap = the number of replicate samplesets selected using sampling with replacement where the “random test points” sets the percentage of test points set aside in each run. 

Subsample = the number or replicate sample sets selected using sampling without replacement based on the “random test points” percentage. 

Maximum iterations 

500 

Stop training after this many iterations of the optimization algorithm. 

Convergence threshold 

0.00001 

Stop training when the drop in log loss per iteration drops below this number. 

Auto feature  

TRUE 

Allow automatic limiting of feature types (listed below) for small sample sizes. 

n > 79 all TRUE features below are selected 

80 > n > 15, linear, quadradic and hinge are selected, if TRUE below 

n< 15 linear and quadradic features are selected, if TRUE below 

n < 10 only linear features are used, if TRUE below 

Default prevalence 

 

0.5 

 

Default prevalence of the species; probability of presence at ordinary occurrence points. (Elith et al. 2001) 

 

Linear 

TRUE 

Allow linear features to be used. 

Quadratic 

TRUE 

Allow quadratic features to be used. 

Product 

TRUE 

Allow product features to be used. 

Threshold 

TRUE 

Allow threshold features to be used. 

Hinge 

TRUE 

Allow hinge features to be used. 

Lq to Lqp threshold 

80 

Number of samples at which product and threshold features start being used, recommend increasing this number or leaving it as default 

Linear to lq threshold 

10 

Number of samples at which quadratic features start being used, recommend increasing this number or leaving it as default 

Hinge threshold 

15 

Number of samples at which hinge features start being used, recommend increasing this number of leaving it as default 

Beta multiplier 

1 

Multiply all automatic regularization parameters by this number; a higher number gives a more spread out distribution. (Warren & Seifert 2011) 

Beta threshold 

-1 

Regularization parameter to be applied to all threshold features; a negative value enables automatic setting. 

Beta categorical 

-1 

Regularization parameter to be applied to all categorical features; a negative value enables automatic setting. 

 

Beta lqp 

-1 

Regularization parameter to be applied to all linear, quadratic and product features; a negative value enables automatic setting. 

 

Beta hinge 

-1 

Regularization parameter to be applied to all hinge features; a negative value enables automatic setting. 

 

 

 

References 

  • Merow, C., Smith, MJ., Silander, JA(2013). A practical guide to MaxEnt for modeling species’ distributions: what it does, and why inputs and settings matter. Ecography, 36(10), 1058-1069. 
  • Phillips, SJ., Anderson, RP.Schapire, RE. (2006). Maximum entropy modeling of species geographic distributions. Ecological modelling, 190(3): 231-259. 
  • Phillips, SJ.Dudík, M. (2008). Modeling of species distributions with Maxent: new extensions and a comprehensive evaluation. Ecography, 31(2): 161-175. 
  • Thibaud, E.Petitpierre, B.Broennimann, O., Davison, A. C.Guisan, A. (2014). Measuring the relative effect of factors affecting species distribution model predictions. Methods in Ecology and Evolution, 5(9), 947-955. 
  • Yackulic, C. B., Chandler, R., Zipkin, E. F., Royle, J. A., Nichols, J. D., Campbell Grant, E. H., & Veran, S. (2013). Presence‐only modelling using MAXENT: when can we trust the inferences?. Methods in Ecology and Evolution, 4(3), 236-243. 

Additional Reading 

  • Aguilar, G. D., Farnworth, M. J., & Winder, L. (2015). Mapping the stray domestic cat (Felis catus) population in New Zealand: Species distribution modelling with a climate change scenario and implications for protected areas. Applied Geography63, 146-154. 
  • Almadrones-Reyes, K. J., & Dagamac, N. H. A. (2018). Predicting local habitat suitability in changing climate scenarios: Applying species distribution modelling for Diderma hemisphaericumCurr. Res. Environ. Appl. Mycol8, 492-500. 
  • Arenas-Castro, S., Gonçalves, J., Alves, P., Alcaraz-Segura, D., & Honrado, J. P. (2018). Assessing the multi-scale predictive ability of ecosystem functional attributes for species distribution modelling. PLoS One13(6), e0199292. 
  • Ball, J. W., Robinson, T. P., Wardell-Johnson, G. W., Bovill, J., Byrne, M., & Nevill, P. G. (2020). Fine-scale species distribution modelling and genotyping by sequencing to examine hybridisation between two narrow endemic plant species. Scientific Reports10(1), 1-12. 
  • Barber, R. A., Ball, S. G., Morris, R. K., & Gilbert, F. (2022). Target‐group backgrounds prove effective at correcting sampling bias in Maxent models. Diversity and Distributions, 28(1), 128-141. 
  • Barbet‐Massin, M., Jiguet, F., Albert, C. H., & Thuiller, W. (2012). Selecting pseudo‐absences for species distribution models: how, where and how many?. Methods in ecology and evolution, 3(2), 327-338. 
  • Bosch, S., Tyberghein, L., Deneudt, K., Hernandez, F., & De Clerck, O. (2018). In search of relevant predictors for marine species distribution modelling using the MarineSPEED benchmark dataset. Diversity and Distributions24(2), 144-157. 
  • Briscoe, N. J., Kearney, M. R., Taylor, C. A., & Wintle, B. A. (2016). Unpacking the mechanisms captured by a correlative species distribution model to improve predictions of climate refugia. Global Change Biology22(7), 2425-2439. 
  • Burke, R. A., Frey, J. K., Ganguli, A., & Stoner, K. E. (2019). Species distribution modelling supports “nectar corridor” hypothesis for migratory nectarivorous bats and conservation of tropical dry forest. Diversity and Distributions25(9), 1399-1415. 
  • Cooper, J. C., & Soberón, J. (2018). Creating individual accessible area hypotheses improves stacked species distribution model performance. Global Ecology and Biogeography27(1), 156-165. 
  • Costion, C. M., Simpson, L., Pert, P. L., Carlsen, M. M., Kress, W. J., & Crayn, D. (2015). Will tropical mountaintop plant species survive climate change? Identifying key knowledge gaps using species distribution modelling in Australia. Biological Conservation191, 322-330. 
  • Dalmaris, E., Ramalho, C. E., Poot, P., Veneklaas, E. J., & Byrne, M. (2015). A climate change context for the decline of a foundation tree species in south-western Australia: insights from phylogeography and species distribution modelling. Annals of Botany116(6), 941-952. 
  • Deblauwe, V., Droissart, V., Bose, R., Sonké, B., Blach‐Overgaard, A., Svenning, J. C., ... & Couvreur, T. L. P. (2016). Remotely sensed temperature and precipitation data improve species distribution modelling in the tropics. Global Ecology and Biogeography25(4), 443-454. 
  • Dempsey, S. J., Gese, E. M., Kluever, B. M., Lonsinger, R. C., & Waits, L. P. (2015). Evaluation of scat deposition transects versus radio telemetry for developing a species distribution model for a rare desert carnivore, the kit fox. PLoS One10(10), e0138995. 
  • Ducci, L., Agnelli, P., Di Febbraro, M., Frate, L., Russo, D., Loy, A., ... & Roscioni, F. (2015). Different bat guilds perceive their habitat in different ways: a multiscale landscape approach for variable selection in species distribution modelling. Landscape ecology30(10), 2147-2159. 
  • El-Gabbas, A., Van Opzeeland, I., Burkhardt, E., & Boebel, O. (2021). Dynamic species distribution models in the marine realm: Predicting year-round habitat suitability of baleen whales in the Southern Ocean. Frontiers in Marine Science, 8(802276). 
  • Evans, T. G., Diamond, S. E., & Kelly, M. W. (2015). Mechanistic species distribution modelling as a link between physiology and conservation. Conservation physiology3(1), cov056. 
  • Fatima, S. H., Atif, S., Rasheed, S. B., Zaidi, F., & Hussain, E. (2016). Species Distribution Modelling of Aedes aegypti in two dengue‐endemic regions of Pakistan. Tropical Medicine & International Health21(3), 427-436. 
  • Feuda, R., Bannikova, A. A., Zemlemerova, E. D., Di Febbraro, M., Loy, A., Hutterer, R., ... & Colangelo, P. (2015). Tracing the evolutionary history of the mole, Talpa europaea, through mitochondrial DNA phylogeography and species distribution modelling. Biological Journal of the Linnean Society114(3), 495-512. 
  • Kramer‐Schadt, S., Niedballa, J., Pilgrim, J. D., Schröder, B., Lindenborn, J., Reinfelder, V., ... & Wilting, A. (2013). The importance of correcting for sampling bias in MaxEnt species distribution models. Diversity and distributions, 19(11), 1366-1379. 
  • Lentini, P. E., & Wintle, B. A. (2015). Spatial conservation priorities are highly sensitive to choice of biodiversity surrogates and species distribution model type. Ecography38(11), 1101-1111. 
  • Lissovsky, A. A., & Dudov, S. V. (2021). Species-distribution modeling: advantages and limitations of its application. 2. MaxEntBiology Bulletin Reviews, 11(3), 265-275. 
  • Manzoor, S. A., Griffiths, G., & Lukac, M. (2018). Species distribution model transferability and model grain size–finer may not always be better. Scientific reports8(1), 1-9. 
  • Morelle, K., & Lejeune, P. (2015). Seasonal variations of wild boar Sus scrofa distribution in agricultural landscapes: a species distribution modelling approach. European Journal of Wildlife Research61(1), 45-56. 
  • Renner, I. W., & Warton, D. I. (2013). Equivalence of MAXENT and Poisson point process models for species distribution modeling in ecology. Biometrics, 69(1), 274-281. 
  • Rodríguez, L., García, J. J., Carreño, F., & Martínez, B. (2019). Integration of physiological knowledge into hybrid species distribution modelling to improve forecast of distributional shifts of tropical corals. Diversity and Distributions25(5), 715-728. 
  • Rodríguez-Rey, M., Consuegra, S., Börger, L., & Garcia de Leaniz, C. (2019). Improving Species Distribution Modelling of freshwater invasive species for management applications. PLoS One14(6), e0217896. 
  • Skroblin, A., Carboon, T., Bidu, G., Chapman, N., Miller, M., Taylor, K., ... & Wintle, B. A. (2021). Including indigenous knowledge in species distribution modeling for increased ecological insights. Conservation Biology35(2), 587-597. 
  • Spiers, J. A., Oatham, M. P., Rostant, L. V., & Farrell, A. D. (2018). Applying species distribution modelling to improving conservation based decisions: a gap analysis of Trinidad and Tobago’s endemic vascular plants. Biodiversity and Conservation27(11), 2931-2949. 
  • Warren, D. L., & Seifert, S. N. (2011). Ecological niche modeling in Maxent: the importance of model complexity and the performance of model selection criteria. Ecological applications, 21(2), 335-342. 
  • Williams, H. M., Willemoes, M., & Thorup, K. (2017). A temporally explicit species distribution model for a long distance avian migrant, the common cuckoo. Journal of Avian Biology48(12), 1624-1636.https://onlinelibrary.wiley.com/doi/full/10.1111/jav.01476 
  • Wittmann, M. E., Barnes, M. A., Jerde, C. L., Jones, L. A., & Lodge, D. M. (2016). Confronting species distribution model predictions with species functional traits. Ecology and Evolution6(4), 873-879. 
  • Zeng, Q., Zhang, Y., Sun, G., Duo, H., Wen, L., & Lei, G. (2015). Using species distribution model to estimate the wintering population size of the endangered scaly-sided merganser in China. PLoS One10(2), e0117307. 
  • Zhang, Z., Xu, S., Capinha, C., Weterings, R., & Gao, T. (2019). Using species distribution model to predict the impact of climate change on the potential distribution of Japanese whiting Sillago japonica. Ecological Indicators104, 333-340. 
  • Zurell, D., Franklin, J., König, C., Bouchet, P. J., Dormann, C. F., Elith, J., ... & Merow, C. (2020). A standard protocol for reporting species distribution models. Ecography, 43(9), 1261-1277.