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.
82 stars 21 forks source link

bm_variableImportance #489

Open ShreePoudel0 opened 1 month ago

ShreePoudel0 commented 1 month ago

In new version how does bm_variableImportance work? I have before computed it with older version of the package but i dont quite understand how it works now.

bm.model | a biomod2_model object (or nnet, rpart, fda, gam, glm, lm, gbm, mars, randomForest, xgb.Booster) that can be obtained with the get_formal_model function

I dont understand this argument

HeleneBlt commented 1 month ago

Hello Shree !

For each single models, biomod2 create a biomod2_model object. They are all stock in the repertory: speciesname/models/AllModels. If you apply the function get_formal_model to this object, it will return the model object created by the package used for this model. Example: for a ANN model, you will have a nnet model object.

Then, the importance variable works in the same way as for the other versions. For each variable to be evaluated :

  1. It shuffles the original variable values
  2. computes model prediction with this shuffled variable and the other explanatory variables un-modified
  3. calculates Pearson's correlation between reference and shuffled predictions
  4. returns score as 1 - cor

The highest the value, the less reference and shuffled predictions are correlated, and the more influence the variable has on the model. A value of 0 assumes no influence of the variable on the model.

Hope it helps, Hélène