True: The customer had moved to another service provider
False: The customer still uses our service
a) Explore the structure of your data and provide some initial descriptive statistics.
b) Divide your data into test and training set.
c) Generate a C5.0 decision tree using training data set. Comment on the output and explain some of the rules generated by the decision tree. In other words, explain some of the variables responsible for Churn of the customers.
d) Predict the class labels for test data set.
e) Comment on the performance of your model on test data (calculate accuracy, error rate, specificity and sensitivity)
f) Use the caret train method to try and find a more optimal C5.0 tree.
g) Use CART algorithm on the training dataset and compare the rules generated by the algorithms.
Write a brief report summarizing your findings. Include screenshots of your R code and output as appropriate.
training.samples <- createDataPartition(mydat$Churn., p = 0.8, list = FALSE)
train.data <- mydat[training.samples,]
test.data <- mydat[-training.samples, ]
#Make a c5.0 tree
c5tree <- C5.0(Churn. ~., data = train.data)
By purchasing this solution you'll be able to access the following files:
report.pdf and churn_decision_Tree.R.