Hello,
I was trying to use gbm for one of the classification problems but I am getting an error:
My code for the gbm:
churn.gbm <- gbm(formula = Churned ~ .,
distribution = "bernoulli",data = logit.data,
n.trees = 1000,interaction.depth = 3,
shrinkage = 0.01,cv.folds = 10)
best.iter <- gbm.perf(churn.gbm,method="OOB")
print(best.iter)
churn.predict <- predict(churn.gbm,
logit.data,
n.trees = best.iter,
metric = "ROC")
churn.roc <- roc(logit.data$Churned,churn.predict)
How can this be solved??Can someone please help me with this??