SCM

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: ecospat.ESM.EnsembleModeling - Error [ Reply ]
By: Maya Guéguen on 2023-01-03 10:02
[forum:49578]
Hello Rodrigo,

biomod2 is now hosted and maintained on github : https://github.com/biomodhub/biomod2
In order to facilitate our job, we try to centralise all issues and questions here : https://github.com/biomodhub/biomod2/issues

However, your issue is linked to the ecospat package, and we are not builder or maintainer of this package. Please check the ecospat github instead : https://github.com/ecospat/ecospat

Thanks in advance,
Maya

ecospat.ESM.EnsembleModeling - Error [ Reply ]
By: Rodrigo Fontana on 2022-12-19 15:21
[forum:49577]
Hello,
I've been trying to use the ESMs (Ensemble of Small Models) to SDM for a list of species (19). However, for some species (4) the function "ecospat.ESM.EnsembleModeling" from "ecospat" package gets an error.
In the previous function "ecospat.ESM.Modeling" I've got some warnings for these species.
Follows the code, warnings, and error messages.

ESM.I.hoehnei<- ecospat.ESM.Modeling(data=biomod.data.I.hoehnei, models=c("GLM","MAXENT.Phillips.2","RF"),
NbRunEval=5,
DataSplit=80,
Prevalence=0.5,
weighting.score=c("AUC","Boyce"),
parallel=T)
## Warnings ()
2: glm.fit: algorithm did not converge
3: glm.fit: fitted probabilities numerically 0 or 1 occurred
4: In lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, ... :
one multinomial or binomial class has fewer than 8 observations; dangerous ground ... (these messages repeat until 50)

Next function where the error appears:
EM.ESM.I.hoehnei<ecospat.ESM.EnsembleModeling(ESM.I.hoehnei,weighting.score='SomersD',threshold=0,models='all')
#### OUTPUT
################################
The following bivariate model(s) failed and are not included for building the ESMs
[1] "MAXENT.Phillips.2.ESM.BIOMOD.10" "MAXENT.Phillips.2.ESM.BIOMOD.11" "MAXENT.Phillips.2.ESM.BIOMOD.13" ... (continues)
################################
The following bivariate model(s) is (are) not included for building the ESMs
because evaluation score is smaller or equal to the given threshold of SomersD = 0 :
[1] "GLM.ESM.BIOMOD.1" "MAXENT.Phillips.2.ESM.BIOMOD.1" "RF.ESM.BIOMOD.1"... (continues)
#### And the error message:
Error in weighted.mean.default(x, weights[grep(models[i], names(weights))], :
'x' and 'w' must have the same length
In addition: Warning messages:
1: In ecospat.ESM.EnsembleModeling(ESM.I.hoehnei, weighting.score = "SomersD", :
MAXENT.Phillips.2.ESM.BIOMOD.10MAXENT.Phillips.2 ... (continues)

I think that I've been getting this error because all of my models have Somers'D values lower than zero (that I set up as the threshold), but I don't know how to solve this (if there is a way). Someone can help me?

Thanks to:
Vienna University of Economics and Business Powered By FusionForge