Open ShreePoudel0 opened 4 months ago
Hello Shree,
Yes, switching from version 4.2-4 to 4.2-5, BIOMOD_ModelingOptions
has been replaced by bm_ModelingOptions. This function can be used together with OPT.[...]
parameters within BIOMOD_Modeling function.
In your case, you would like to modify yourself some options, so using strategy = 'user.defined'
.
Did you have a look at our modeling options vignette (the User defined section at the end) ? :eyes:
Which parameters would like to change in RF
and GBM
?
You can also check if they are already set in the way you want within the biomod2 bigboss options.
Maya
Hello. I read the vignette of modeling options but couldnt implement it well. myBiomodOption <- BIOMOD_ModelingOptions(RF= list(nodesize = 15, maxnodes = 10), GBM = list(n.trees = 500)) This was what i used previously in BIOMOD_modelingoptions. How do we implement this in current bm_modelingoptions functions? Thank you
Hello Shree,
## Here are the parameters you want to change :
user.RF <- list('_allData_allRun' = list(nodesize = 15))
user.GBM <- list('_allData_allRun' = list(n.trees = 500))
## Gather in one list
## Models names can be found in OptionsBigboss@models
user.val <- list(RF.binary.randomForest.randomForest = user.RF,
GBM.binary.gbm.gbm = user.GBM)
myOpt <- bm_ModelingOptions(data.type = 'binary',
models = c("RF", "GBM"),
strategy = "user.defined",
user.val = user.val,
user.base = "bigboss",
bm.format = myBiomodData)
print(myOpt)
Maya
I tried following your code and i got this error. The code runs fine for 'bigboss'
user.RF <- list('_allData_allRun' = list(nodesize = 15, maxnodes = 15)) user.GBM <- list('_allData_allRun' = list(n.trees = 500))
user.val <- list(RF.binary.randomForest.randomForest = user.RF, GBM.binary.gbm.gbm = user.GBM)
myOpt <- bm_ModelingOptions(data.type = 'binary', models = c('RF', 'GBM'), strategy = "user.defined", user.val = user.val, user.base = "bigboss")
user.val <- list(RF.binary.randomForest.randomForest = user.RF, GBM.binary.gbm.gbm = user.GBM)
myOpt <- bm_ModelingOptions(data.type = 'binary', models = c('RF', 'GBM'), strategy = "user.defined", user.val = user.val, user.base = "bigboss")
I got the following error
Error in eval(predvars, data, env) : object 'X' not found Error in GBM , calibration failed inherits(g.pred,'try-error') ! Note : Gaur_PA1_RUN1_GBM failed!
On Mon, May 27, 2024 at 6:54 PM MayaGueguen @.***> wrote:
Hello Shree,
Here are the parameters you want to change :
user.RF <- list('_allData_allRun' = list(nodesize = 15)) user.GBM <- list('_allData_allRun' = list(n.trees = 500))
Gather in one list
Models names can be found in @.***
user.val <- list(RF.binary.randomForest.randomForest = user.RF, GBM.binary.gbm.gbm = user.GBM)
myOpt <- bm_ModelingOptions(data.type = 'binary', models = c("RF", "GBM"), strategy = "user.defined", user.val = user.val, user.base = "bigboss") print(myOpt)
Maya
— Reply to this email directly, view it on GitHub https://github.com/biomodhub/biomod2/issues/461#issuecomment-2133452387, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBPZRFVLSGTRYCZHSHLF3QDZEMV7XAVCNFSM6AAAAABH7JBZK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZTGQ2TEMZYG4 . You are receiving this because you authored the thread.Message ID: @.***>
Hello Shree,
I made a correction to my previous answer, please check and try again. You have to give your output from the BIOMOD_FormatingData function to the bm_ModelingOptions function.
Maya
Hello. It seems there was an update that changed BIOMOD_ModelingOptions to bm_modelingoptions. I was manually changing the parameters of RF and GBM. Now i dont know how to do it. I didnt understand the tutorial mentioned in previous issue regarding same problem. Can you explain how the function works now. Thank you