This project builds a decision tree that predicts which subscription customers will leave, using contract, complaint and payment data. The model is tested with 10-fold cross validation and read through accuracy, AUC, and the most influential attributes.
Business Goal
Spot customers about to leave before they actually go. Application area: Marketing / CRM. Project level: beginner.
RapidMiner Tools and Operators
The process is built with these operators:
- Read CSV
- Remap Binominals
- Multiply
- Cross Validation
- Decision Tree
- Apply Model
- Performance (Binominal Classification)
- Weight by Information Gain Ratio
- Performance to Data
- Weights to Data
- Write CSV
What You Will Learn
- Understand the full classification flow: data, model, cross validation and evaluation
- Read accuracy, AUC, precision and recall for business decisions, not just numbers
- Identify the factors that drive customers away using attribute weights
Working Steps
- Read the subscription data and set column roles — Read CSV loads data_langganan.csv (3,000 customers). In the column settings, id_pelanggan is the id and berhenti is the label of binominal type (yes/no).
- Define the positive class — Remap Binominals sets "ya" (yes) as the positive class and "tidak" (no) as negative, so precision and recall measure how well leavers are found.
- Duplicate the data — Multiply makes two copies of the data: one for cross validation and one for computing attribute weights.
- Build the model inside Cross Validation — Cross Validation with 10 folds and stratified sampling. In the Training part place Decision Tree (gain ratio criterion, maximal depth 5, pruning on).
- Test the model in the Testing part — Apply Model applies the tree to the test fold, then Performance (Binominal Classification) computes accuracy, AUC, precision, recall, F-measure and kappa.
- Rank the most influential attributes — Weight by Information Gain Ratio scores every attribute from 0 to 1 so you can see which factors best separate leavers from stayers.



