You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using dismo gbm function gbm.step with the following hyperparameters:
brt <- gbm.step(data = train,
gbm.x = 5:9, # column indices for covariates
gbm.y = 4, # column index for response (presence-absence)
family = "bernoulli",
tree.complexity = ifelse(prNum < 50, 1, 5),
learning.rate = 0.001,
bag.fraction = 0.75,
max.trees = 10000,
n.trees = 50,
n.folds = 5, # 5-fold cross-validation
silent = TRUE) # avoid printing the cv results
The issue that I am encountering is related (I think) to the max.trees parameter or n.trees parameter. Species with low prevalence (20~30 presences out of 449 absences) return the following error:
Error in UseMethod("predict") :
no applicable method for 'predict' applied to an object of class "NULL"
In addition: There were 50 or more warnings (use warnings() to see the first 50)
The model brt becomes NULL and my loop stops because of that. I tried to use ifelse for those species, changing the number of max.trees to 50, and it worked for some of them, but not all. Any idea about what is happening here? I haven't found anything like this on the internet. If needed, I can upload my script and rds files. Thanks!
The text was updated successfully, but these errors were encountered:
ggrittz
changed the title
gbm.step not able to predict
gbm.step unable to fit some models
Sep 12, 2022
Oh, another weird thing is that even if I am using ifelse, the models for those low prevalence species are generated with much more than 50 max.trees. But, if I don't use ifelse, the error returns.
Hello,
I've been using
dismo
gbm functiongbm.step
with the following hyperparameters:The issue that I am encountering is related (I think) to the
max.trees
parameter orn.trees
parameter. Species with low prevalence (20~30 presences out of 449 absences) return the following error:The model
brt
becomesNULL
and my loop stops because of that. I tried to useifelse
for those species, changing the number ofmax.trees
to 50, and it worked for some of them, but not all. Any idea about what is happening here? I haven't found anything like this on the internet. If needed, I can upload my script and rds files. Thanks!The text was updated successfully, but these errors were encountered: