October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps to calculate and classify data with the gradient boosting method:
> install.packages("gbm")
> library(gbm)
> trainset$churn = ifelse(trainset$churn == "yes", 1, 0)
> set.seed(2)
> churn.gbm = gbm(formula = churn ~ .,distribution = "bernoulli" ,data = trainset,n.trees = 1000,interaction.depth = 7,shrinkage = 0.01, cv.folds=3)
> summary(churn.gbm)
Read now
Unlock full access