ENMeval: An R package for conducting spatially independent evaluations and estimating optimal model complexity for Maxent ecological niche models

532 views
Skip to first unread message

romunov

unread,
Sep 9, 2014, 6:12:12 AM9/9/14
to maxent
I got a notification from google scholar about a paper regarding MaxEnt. I thought it might interest those that use it through R.

bob.mus...@gmail.com

unread,
Sep 13, 2014, 6:39:04 PM9/13/14
to max...@googlegroups.com
Hi all,
(Thanks for your post, Roman, you beat me to the punch!)

I wanted to send a notice to this list about our new R package, ENMeval.  The package should be helpful to complete species-specific tuning of MaxEnt models using R.  In addition, some of the functions can be useful more generally for other algorithms besides MaxEnt.  The three main components of ENMeval are:

(1) Partitioning datasets for cross validation using one of six methods (including options designed to achieve spatially independent partitions).
(2) Executing a series of MaxEnt models across a user-defined range of regularization multiplier and feature class settings.
(3) Summarizing numerous evaluation metrics to aid in species-specific tuning and model evaluation.

You can read about this in a open-access paper in Methods in Ecology and Evolution:


Hope you find it helpful,
Bob

Jodi

unread,
Feb 20, 2015, 4:54:41 PM2/20/15
to max...@googlegroups.com
Hi Bob (All), 

Does the R package ENMeval allow for multithreading in the call to ENMevaluate? 

If yes, is this running internally? Or alternatively, should the number of threads be specified with 'maxent.args' (as with R dismo call to maxent, args, threads=n). 

If no, perhaps the R package parallel could be user implemented? 

Thank you, 

Best, 

Jodi

bob.mus...@gmail.com

unread,
Apr 3, 2015, 8:46:38 AM4/3/15
to max...@googlegroups.com
Hi Jodi,

We have not implemented any multithreading in ENMeval but maybe it would be a good idea - thanks for mentioning it.  I just tested it on my machine and I didn't see a time savings compared to the single thread run.  Has it worked well for you when running through R?  

I think that running the different models in parallel might be an even bigger way to speed things up.  I think this is different from telling Maxent to use multiple threads because the loop making and evaluating different models could be split up rather than the individual maxent calls.  Perhaps this is not too difficult for someone who knows how to use the parallel (or some other) package.  Unfortunately, at this stage I don't know how to do that so it will have to remain a pending issue... 

Please do let me know if you find good ways to do speed things up.  It'd be great to include these options in future versions of ENMeval.  All the best,

Bob

Madeline Steele

unread,
Jul 25, 2015, 11:31:37 AM7/25/15
to Maxent
Hello Bob,

First off, many thanks to you and your team for creating and sharing this very useful package. It should allow me to build much more robust models in a limited time.

I have one primary question: It seems that the ENMevaluate function requires a raster stack, whereas the dismo MaxEnt call allows you to specify a dataframe with values for all environmental covariates at each location and an associated presence/absence vector. I prefer this approach as it is faster and also gives you more control over the background sample. Is there any chance that you might tweak the code to allow use of dataframes too? If not, do you have any idea how difficult it might be for an intermediate R user to make that change to the source code?

Thanks again,

Madeline

Jamie M. Kass

unread,
Jul 25, 2015, 11:09:41 PM7/25/15
to Maxent, madelin...@gmail.com
Yes, is it a bit faster, but we implemented ENMeval for use with raster stacks. It wouldn't be too much work to add this functionality to the next version, and if I get to this soon I can post a github download if you want to use this quickly. Otherwise, maybe what's best for the time being is to use a raster stack for now. We'll get to it, I promise! Maybe Bob wants to weigh in too.

Jamie M Kass
PhD student, City College of NY

swammy50

unread,
Jul 26, 2015, 12:06:19 AM7/26/15
to max...@googlegroups.com, madelin...@gmail.com
Madeline

You could rasterize your dataframe into a stack. That way you would still have control over the background. I agree better to have an option for a dataframe but this work around should work in the meantime.

Sam
> --
> You received this message because you are subscribed to the Google Groups "Maxent" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to maxent+un...@googlegroups.com.
> To post to this group, send email to max...@googlegroups.com.
> Visit this group at http://groups.google.com/group/maxent.
> For more options, visit https://groups.google.com/d/optout.

Bob Muscarella

unread,
Jul 26, 2015, 2:13:50 AM7/26/15
to max...@googlegroups.com, madelin...@gmail.com
Hi Madeline and all,

Although ENMeval only accepts raster stacks as input, one of the first steps internally is to extract to a data frame. Then, it runs maxent using the data frame, just as you are wanting to do. We made it that way because you're right, it is faster. So, we could eventually make an option for user inputs to already be in a data frame ("samples with data") format but time savings would be very marginal (you'd only avoid the time to do 1 extraction of data from the grids). Also, it wouldn't work with any of automated spatial data partitioning methods (block or checkerboard routines). 

In terms of having control on background, this is very possible with the current version of ENMeval. You need only to provide the coordinates of background points as the "bg.coords" argument for the ENMevaluate function (see help documentation). You can also provide the groups to use as evaluation bins (if choosing the "user-defined" partitioning method), or use one of the other 5 automated methods to partition your (user supplied) background points for model evaluation.

In a tangential note, Jamie and I are working on a new version of ENMeval that can implement parallel processing. This can help speed things up a lot. We'll be posting to this list as soon as that is available (hopefully within 2 months).

I hope this is helpful, let me know if I can clarify anything or you have more questions. 

Bob

You received this message because you are subscribed to a topic in the Google Groups "Maxent" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/maxent/PrJF4pBROv8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to maxent+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages