infile = "WAFnUseCTelcoCustomerChurn.csv"
Consolidations : Customer Churns in Telecom Industry
Customer Churns in Telecom Industry : Decision Tree Analysis
Decision Tree Model : Output Summary
indata_model_Telecom
##
## Model formula:
## Churn ~ gender + PhoneService + MultipleLines + StreamingMovies +
## Contract + PaymentMethod
##
## Fitted party:
## [1] root
## | [2] Contract in Month-to-month
## | | [3] StreamingMovies in No, Yes
## | | | [4] PaymentMethod in Bank transfer , Credit card , Mailed check: No (n = 949, err = 36.9%)
## | | | [5] PaymentMethod in Electronic check: Yes (n = 1073, err = 45.2%)
## | | [6] StreamingMovies in No internet service: No (n = 312, err = 16.7%)
## | [7] Contract in One year, Two year
## | | [8] Contract in One year
## | | | [9] StreamingMovies in No, No internet service: No (n = 493, err = 4.5%)
## | | | [10] StreamingMovies in Yes: No (n = 386, err = 19.2%)
## | | [11] Contract in Two year
## | | | [12] PaymentMethod in Bank transfer , Credit card , Mailed check: No (n = 913, err = 1.4%)
## | | | [13] PaymentMethod in Electronic check: No (n = 99, err = 7.1%)
##
## Number of inner nodes: 6
## Number of terminal nodes: 7
Decision Tree Model : Confusion Matrix
indata_pred_Telecom = predict(indata_model_Telecom, indata_test)
Telecom_conft = table("prediction" = indata_pred_Telecom, "actual" = indata_test$Churn)
| No | Yes | |
|---|---|---|
| No | 1740 | 370 |
| Yes | 315 | 393 |