Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User bug with dismo::evaluate #132

Open
kurtvanwyk opened this issue Apr 5, 2024 · 1 comment
Open

User bug with dismo::evaluate #132

kurtvanwyk opened this issue Apr 5, 2024 · 1 comment

Comments

@kurtvanwyk
Copy link

kurtvanwyk commented Apr 5, 2024

Hi all,

I am running a few different ESDMs and one SSDM using reptile and amphibian presence-only data from South Africa and Zimbabwe. When running the following script (or the equivalent for ESDMs):

Reptiles_SSDM <- stack_modelling(c("GLM","GAM","RF","MAXENT"), Reptiles_occ, env_final,
                          rep = 1, Xcol = "Long", Ycol = "Lat", Spcol = "Species",
                          PA = list(nb=10000, strat="random"), cv = "holdout",
                          cv.param = c(0.8, 1), ensemble.metric = "AUC", ensemble.thresh = 0.7,
                          weight = TRUE, bin.thresh = "SES", method = "pSSDM")

I continue to encounter the following error:

Error in dismo::evaluate(p = predicted.values[which(eval.testdata$Presence == :
cannot evaluate a model without absence and presence data that are not NA

I cannot seem to trace the fault. My Occurrences and Env data are in the same projection, and I don't see why the pseudo-absences would be NA.

Additionally, including the GBM algorithm immediately causes R to abort. I am using R 4.3.2 and RStudio 2023.12.1.

Any insight would be greatly appreciated.

Kind regards,

Kurt

@sylvainschmitt
Copy link
Owner

Dear @kurtvanwyk , I can't reproduce your issue with last version of R. Try reinstalling your packages, especially dismo. And if the bug persist try to make a reproducible example with the data from the package.

@sylvainschmitt sylvainschmitt changed the title Persistent error in ensemble_modelling() and stack_modelling() User bug with dismo::evaluate May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants