biomodhub / biomod2

BIOMOD is a computer platform for ensemble forecasting of species distributions, enabling the treatment of a range of methodological uncertainties in models and the examination of species-environment relationships.
77 stars 21 forks source link

Need Help!Model result evaluation- Response Curves and the threshold value of the probability of presence #427

Closed TY-dispersal closed 3 months ago

TY-dispersal commented 4 months ago

Hi, I built an ensemble model using 10 models supported in biomod2, specifically: using the biomod2 package to generate pseudo-existence points (two replicates), and running each model 10 replicates. I successfully got my results. But I don't understand enough about the evaluation of the results. I am a beginner in R, and biomod2 is the first package I learned. So my question may be rudimentary but I really need your help.

First is the response curve.

  1. I successfully generated the response curve, but I want to know whether the function bm_PlotResponseCurves() can be set to display the confidence interval of the response curve.
  2. What do the black blocks shown on the abscissa of the response curve mean, because they are not environmental data brought by distribution points. Is it possible to display only the environmental data caused by the existence of distribution points through the setting of function bm_PlotResponseCurves(). my code:(The following codes at both ends get the same result) RCurve <- bm_PlotResponseCurves(bm.out = myBiomodEM, models.chosen = get_built_models(myBiomodEM), fixed.Var = "mean", do.bivariate = FALSE, do.plot = TRUE, do.progress = FALSE, data_species = myResp) bm_PlotResponseCurves(bm.out = myBiomodEM, models.chosen = get_built_models(myBiomodEM), fixed.var = 'mean') 1709454727343

Secondly, the threshold value of the probability of presence. I got the evaluation results of the model, but I want to know whether the threshold value of the probability of presence is the cutoff value returned by the get_evaluations() function of the model evaluation results. my code: get_evaluations(myBiomodEM) full.name merged.by.PA 1 PK_EMwmeanByTSS_mergedData_mergedRun_mergedAlgo mergedData 2 PK_EMwmeanByTSS_mergedData_mergedRun_mergedAlgo mergedData merged.by.run merged.by.algo filtered.by algo metric.eval 1 mergedRun mergedAlgo TSS EMwmean TSS 2 mergedRun mergedAlgo TSS EMwmean ROC cutoff sensitivity specificity calibration validation evaluation 1 437.0 97.561 87.538 0.851 NA NA 2 436.5 97.561 87.538 0.973 NA NA

HeleneBlt commented 3 months ago

Hello !

To modify the plots from bm_PlotResponseCurves, you can't use the function directly but you can modify the results. You can create the plot with RCurve$tab or add some elements to RCurve$plot. You can have a look at the issue #192 where Maya offers some codes for confidence intervals. I hope this helps answer your first questions.

About the threshold, yes here cutoff is the associated cut-off used to transform the continuous values into binary. So it is the optimized threshold value of the probability of presence for the associated metric.

I hope that's clearer !

Hélène

TY-dispersal commented 3 months ago

Hello I tried it and successfully generated the curve, thank you very much.