Skipping ... because it has 0 test samples

1,101 views
Skip to first unread message

Johannes Sörensen

unread,
Oct 3, 2018, 10:14:43 AM10/3/18
to Maxent
Hello,

I have a problem running Maxent 3.4.1 with a test samples file. Whenever I provide that file it simply states it has 0 test samples.
I'm using an swd file for presence and background data and my test file has the exact same format.
I read https://groups.google.com/forum/#!topic/maxent/drMvPdYxGCM and https://groups.google.com/forum/#!topic/maxent/1S22o5nywvc but it didn't help rounding the coordinates. I'm using the same coordinate system consistently across all my files (ETRS89-32N). It works just fine without the test samples file.

I've attached my files for one species to reproduce the error.

This is my command:

java -mx1820m -jar ~/Documents/Uni/Master/software/maxent/maxent.jar outputdirectory=/home/johannes/Documents/Uni/Master/model/sdm//2018.10.01_12-20/Alytes.obstetricans/ samplesfile=/home/johannes/Documents/Uni/Master/occurences/swd/samples_final_Alytes.obstetricans_swd.csv testsamplesfile=/home/johannes/Documents/Uni/Master/occurences/swd/samples_final_Alytes.obstetricans_swd_test.csv environmentallayers=/home/johannes/Documents/Uni/Master/occurences/swd/samples_final_Alytes.obstetricans_swd_back.csv projectionlayers=/home/johannes/Documents/Uni/Master/predictors/asc/ responsecurves jackknife randomseed replicatetype=bootstrap nooutputgrids writebackgroundpredictions replicates=10 visible=FALSE autorun=TRUE extrapolate=FALSE threads=8

I have to use a separate file because I reduced points (to avoid spatial autocorrelation) in both the samples file and the test file separately to get more locations for each.
samples_final_Alytes.obstetricans_swd.csv
samples_final_Alytes.obstetricans_swd_back.csv
samples_final_Alytes.obstetricans_swd_test.csv

Husam El Alqamy

unread,
Oct 3, 2018, 11:52:17 AM10/3/18
to max...@googlegroups.com
I can see two possible reasons for 0 Samples reported by Maxent in your data
1- Try changing the header titles X & Y to Longitude and Latitude.
2- Check these CSV files in a text editor (not excel or wordPad) and make sure that the delimiter is (,) and not (;) sometimes if you export CSV from Excel it uses (;) as the delimeter depending on your windows locale settings.
Hope this helps
Regards


Hossameldin ELALKAMY, MPhill., PhD.

GIS Analyst 

BC Timber Sales|  Prince george

Ministry of Forests, Lands and Natural Resource Operations

P. 250.614.7521 C. 778.896.3229|2000 Ospika Blvd.

Prince George, BC,V8W 9M1

 | Profile





--
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 https://groups.google.com/group/maxent.
For more options, visit https://groups.google.com/d/optout.

Johannes Sörensen

unread,
Oct 3, 2018, 12:59:20 PM10/3/18
to Maxent
Thank you for your response!

Unfortunately I can exclude both. I changed the header to species, longitude, latitude as in this tutorial: https://biodiversityinformatics.amnh.org/open_source/maxent/Maxent_tutorial2017.pdf

I'm still having the same issues.
About the second suggestion: I'm using the r function write.csv which uses "," by default. Of course I also looked into the csv file.

It is possible to reproduce the error with the swd files from my previous post (You have to modify the paths).

java -mx1820m -jar "maxent.jar" outputdirectory="." samplesfile=samples_final_Alytes.obstetricans_swd.csv testsamplesfile=samples_final_Alytes.obstetricans_swd_test.csv environmentallayers=samples_final_Alytes.obstetricans_swd_back.csv responsecurves jackknife randomseed replicatetype=bootstrap nooutputgrids writebackgroundpredictions replicates=10 autorun=TRUE extrapolate=FALSE threads=8

Best regards
Johannes Sörensen

Johannes Sörensen

unread,
Oct 3, 2018, 1:09:51 PM10/3/18
to Maxent
I just noticed it works when I remove the replicatetype and replicates parameters. It ignores the test samples when using crossvalidate and the described error appears only on bootstrap. I'm getting awful results however without bootstrap. Any reasons why it should not work with this?

AC

unread,
Oct 21, 2018, 9:17:43 AM10/21/18
to Maxent
If you are using UTM projection, I changed my header names to easting and northing and it worked. 
Reply all
Reply to author
Forward
0 new messages