While trying to use gbm I have got stuck in an error:
train.rose$Churn <- ifelse(train.rose$Churn == "Yes",1,0) fit.gbm<-gbm.fit(train.rose[,1:17], as.factor(train.rose[,18]), n.tree=500, interaction.depth=4, shrinkage=0.001,verbose=FALSE,bag.fraction = 0.5, distribution = "bernoulli") best.iter<-gbm.perf(fit.gbm,plot.it=TRUE,oobag.curve=F,method="OOB")
Why is this error cropping up?
However,if I use distribution as laplace it works and the OOB curve is:
I am using bernoulli distribution as I want to model Churn as 1/0 but then with it the OOB curve is not getting generated.
Can someone please help me regarding this??