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
When a numeric or integer of length 0 is given as an argument to n.trees in predict.gbm(), it causes a crash (not an error), forcing the reset of the R session. This should fail more gracefully so the error can at least be captured rather than causing a full crash.
Example (will cause a crash, so do it in its own R session):
library(gbm)
data("lalonde", package = "cobalt")
fit <- gbm(treat ~ age + educ + married,
data = lalonde, n.trees = 100)
p <- predict(fit, n.trees = numeric()) #crash for non-NULL of length 0
The text was updated successfully, but these errors were encountered:
When a
numeric
orinteger
of length 0 is given as an argument ton.trees
inpredict.gbm()
, it causes a crash (not an error), forcing the reset of the R session. This should fail more gracefully so the error can at least be captured rather than causing a full crash.Example (will cause a crash, so do it in its own R session):
The text was updated successfully, but these errors were encountered: