Closed wolski closed 5 years ago
@wolski This is odd indeed. The fitted models is essentially empty! I'll look into it over the next couple of days!
I see the issue @wolski. Your response is coded as 0/1, but stored with class "factor"
. Using distribution = "bernoulli"
requires the response to be an integer coded as 0/1. gbm has never done a good job at checking for this via the formula method, so perhaps we can improve this before the next release (which will hopefully be soon). For now, the following should work:
diachp.boost <- gbm(
as.integer(cheap) - 1 ~ .,
data = diachp,
shrinkage = 0.001,
distribution = "bernoulli",
n.trees = 300,
verbose = F
)
Closing this issue and opening a new one here https://github.com/gbm-developers/gbm/issues/37.
These are the errors produced.
below is the code to reproduce it. I do attach the diachp.Rds file in zip archive (direct upload of Rds files not posibble).
diachp.zip