Closed jpmaalouf closed 1 year ago
Bonjour Jean-Paul,
Thank you for submitting the issue on github, it is really appreciated :pray:
Your issue highlight a code difference between mean, median and CV calculation. Mean and median uses na.rm = FALSE
while CV uses na.rm = TRUE
. So EMcv is able to calculate mean/sd where EMmean and EMmedian are not. This also imply that you have some individual models that predict NA
in the area concerned.
A few conclusion:
na.rm
in BIOMOD_EnsembleForecasting
:
na.rm
decision and will likely set na.rm = TRUE
as default for all ensemble algorithm.na.rm = FALSE
na.rm = TRUE
for all), I can also set a dedicated biomod2 branch for you, depending on the version you are currently using.NaN
predictions because of environmental variables are out of calibration range_Note that you can also identify out of range predictions by using build.clamping.mask = TRUE
in BIOMOD_Projection
or BIOMOD_EnsembleForecasting
. Some areas will then be filled with NA
when variables are out of calibration ranges._
Feel free to update the issue if you have additional information or question. I will update it when the fix to na.rm
will be available.
Best regards, The biomod2 team
Bonjour the biomod2 team!
Thank you very much for your prompt and efficient reply.
Cheers!
Jean Paul
Bonjour Jean Paul,
na.rm
. You can download it with devtools::install_github('biomodhub/biomod2')
. It will likely be available on CRAN in the following weeks. BIOMOD_EnsembleForecasting
part, but it is also likely that you'll have to start again. Let me know if that happens and need a dedicated branch inserting the correction for version 4.2-2
.Cheers, Rémi
Bonjour Rémi !
Thank you very much for the na.rm fix. I downloaded the updated version on github. The help documentation of the function now includes the na.rm argument. I tried re-launching the whole workflow from BIOMOD_Modeling()
, and it blocked at BIOMOD_EnsembleForecasting()
with the error Error in { : task 6 failed - "[write] unknown option(s): na.rm"
.
Cheers
Jean Paul
Bonjour Jean Paul,
Indeed there was a small mistake on my side. na.rm
argument was on the wrong side of a bracket in some of the calculations (especially for EMci
algorithm). This should be fixed now if you update again. You should just have to re-launch BIOMOD_EnsembleForecasting
and it should (hopefully) work.
Cheers, Rémi
Bonjour Jean Paul,
There was a tiny mistake on my end when implementing the na.rm
argument (a misplaced bracket). It is now corrected, sorry for that :pray:
If you update again to current github version, it should now work and you should just have to rerun BIOMOD_EnsembleForecasting
hopefully.
Cheers,
Rémi
Bonjour Rémi,
Never got the chance to say big thank you for what you did on this issue :). Il n'est jamais trop tard. Our project is now done and delivered.
All the best,
JP
Issue
We are having an issue on the final projections from ensemble models. In all ensemble models except CV, the map includes projection gaps corresponding to NA projection values.
This is surprising as CV incorporates the mean in its formula. So if CV is computed, how come the mean is not?
Here is the basic biomod code we used, as well as three projection maps :
Code
Biomod parameters
Biomod modeling
Projections
Mean (gap in the northwest)
Median (gap in the northwest)
Coefficient of variation (no gaps)