Buyer churn is a big difficulty for companies, notably in industries with recurring income fashions, reminiscent of telecommunications. Churn refers to prospects discontinuing their use of an organization’s service, which may result in direct income loss and elevated buyer acquisition prices. Fixing the churn drawback is essential as a result of retaining current prospects is usually more cost effective than buying new ones. By figuring out prospects susceptible to churn, companies can implement focused retention methods to cut back churn charges and enhance buyer lifetime worth (CLV).
Drawback Assertion
The issue revolves round figuring out which prospects are prone to churn and implementing efficient methods to retain them. Decreasing churn may end up in improved buyer lifetime worth (CLV), which is a key metric for understanding the long-term income potential of a buyer.
Motivation
Understanding and stopping buyer churn is crucial for sustaining enterprise progress. Excessive churn charges can considerably scale back income, influence profitability, and pressure corporations to spend extra sources on buyer acquisition. By figuring out at-risk prospects, the enterprise can implement personalised initiatives, reminiscent of focused advertising campaigns, reductions, or enhancements in customer support, to forestall churn. Fixing this drawback may assist the enterprise optimize its sources and focus retention efforts on the purchasers more than likely to churn.
Enter
The enter for this mission is buyer churn information obtained from an Iranian telecom firm. The dataset, collected over 12 months, consists of 3150 rows and 13 columns, every representing buyer conduct and attributes. This dataset was sourced from the UCI Machine Studying Repository and will be accessed on the following hyperlink: Iranian Churn Dataset.
Output
The output of this mission is a mannequin that predicts the churn likelihood for every buyer based mostly on their attributes. Moreover, the mission will calculate the Buyer Lifetime Worth (CLV) to estimate how a lot income every buyer is anticipated to generate over their lifetime. The mannequin will assist establish at-risk prospects and supply actionable insights to forestall churn by focused retention methods. I apply a Logistic Regression mannequin to foretell the likelihood of buyer churn. Based mostly on these predictions, I calculate the Buyer Lifetime Worth (CLV) for every buyer. Utilizing decile evaluation and cumulative acquire charts, I can establish which prospects ought to be focused with retention initiatives to maximise income and reduce churn.
Hyperlink to the Github Repository: https://github.com/dinanditio/Customer-Churn-Prediction-and-Retention-Strategies-using-Logistic-Regression
Buyer churn prediction is a well-studied drawback, notably in industries like telecommunications. A number of analysis papers have explored this space utilizing a spread of machine studying fashions, together with Logistic Regression, Choice Timber, and extra advanced ensemble strategies reminiscent of Random Forests and Gradient Boosting. These approaches have their distinctive benefits and downsides when in comparison with the easier strategies we’re utilizing in our mission, reminiscent of Logistic Regression.
Comparability of Associated Work:
Gaur & Dubey (2018) — A Comparative Research on Machine Studying Algorithms for Churn Prediction
· Benefits: This paper in contrast a number of fashions, reminiscent of Logistic Regression, Random Forest, and Gradient Boosting, for churn prediction. It discovered that Gradient Boosting carried out greatest by way of accuracy. The benefit of utilizing ensemble fashions like Gradient Boosting or Random Forest is that they sometimes present increased predictive energy attributable to combining a number of fashions.
· Disadvantages: The principle downside, as highlighted by the authors, is the elevated computational complexity and longer coaching instances for these ensemble strategies, which may very well be a limitation in real-world implementations the place fast predictions are required.
Dalvi et al. (2016) — Churn Prediction utilizing Logistic Regression and Choice Timber
· Benefits: This work explored using Logistic Regression and Choice Timber for predicting churn within the telecommunications sector. A key energy of Choice Timber is their interpretability, as they supply a transparent decision-making path that may be visually represented.
· Disadvantages: The authors discovered that Choice Timber are inclined to overfit the info, particularly when working with a small dataset or when there may be excessive variability in buyer conduct. Logistic Regression, whereas extra strong, doesn’t seize non-linear relationships in addition to different fashions.
De Caigny et al. (2018) — A New Hybrid Mannequin for Buyer Churn Prediction based mostly on Logistic Regression and Choice Timber
· Benefits: This paper proposed the Logit Leaf Mannequin (LLM), a hybrid strategy that mixes Choice Timber with Logistic Regression. The energy of this mannequin is its potential to mix the segmentation energy of Choice Timber with the probability-based predictions of Logistic Regression, resulting in improved accuracy with out sacrificing interpretability.
· Disadvantages: Regardless of higher efficiency, the mannequin is extra advanced to implement and requires cautious calibration to keep away from overfitting, particularly when working with bigger datasets.
Benefits and Disadvantages of This Venture:
Benefits of this mission:
- Simplicity and Interpretability: Logistic Regression is straightforward to interpret and offers clear insights into how every characteristic impacts the probability of churn. That is vital for decision-makers who could not have a technical background.
- Function Engineering: Iinclude new options, reminiscent of Complaints_CustomerValue and Whole Utilization, to boost the mannequin’s efficiency.
- Actionable Insights: Along with predicting churn, I estimate Buyer Lifetime Worth (CLV) and use decile evaluation to advocate focused churn prevention methods.
Disadvantages of This Venture:
- Decrease Accuracy: Logistic Regression could not carry out in addition to ensemble fashions like Gradient Boosting or Random Forest, particularly in capturing advanced relationships within the information.
- No Hybrid Mannequin: I don’t implement a hybrid mannequin, such because the Logit Leaf Mannequin (LLM), which might doubtlessly present a greater stability between segmentation and prediction.
- Restricted Non-Linear Interplay: Logistic Regression could miss some non-linear interactions between variables that extra advanced fashions might seize.
Whereas the associated work demonstrates the effectiveness of superior fashions reminiscent of ensemble strategies and hybrid fashions for churn prediction, this mission prioritizes interpretability and sensible utility. Logistic Regression presents an easier, extra clear mannequin, which is essential for real-time decision-making and actionable insights in a enterprise context. Future work might contain incorporating ensemble strategies or hybrid fashions to enhance predictive accuracy whereas sustaining a stability between complexity and interpretability.
The dataset used for this mission is the Iranian Churn Dataset, sourced from the UCI Machine Studying Repository (link to dataset). This dataset is randomly collected from an Iranian telecom firm’s database over a interval of 12 months. It consists of 3150 rows, every representing a buyer, and contains 13 columns that present details about buyer conduct and interactions with the telecom service. The dataset is particularly designed for churn prediction duties within the telecommunications business.
Goal Variable: Churn
(binary label indicating whether or not a buyer has churned or not)
Options:
- Name Failures: Variety of failed name makes an attempt.
- Frequency of SMS: Variety of SMS messages despatched by the shopper.
- Variety of Complaints: Rely of complaints filed by the shopper.
- Distinct Known as Numbers: Variety of distinctive telephone numbers referred to as by the shopper.
- Subscription Size: Period of the shopper’s subscription (in months).
- Age Group: Categorical variable representing the shopper’s age group.
- Cost Quantity: Whole quantity spent by the shopper.
- Sort of Service: Sort of service plan the shopper is subscribed to.
- Seconds of Use: Whole period (in seconds) of calls made by the shopper.
- Standing: Buyer’s present service standing.
- Frequency of Use: How continuously the shopper makes use of the service.
- Buyer Worth: A rating representing the general worth of the shopper to the enterprise.
Preprocessing Steps:
1. Dealing with Lacking Values: The dataset was first checked for lacking values. Any lacking information was dealt with utilizing both imputation (for numerical options) or assigning essentially the most frequent class (for categorical options). Happily, this dataset had minimal lacking information.
2. Function Engineering:
- Created new options reminiscent of Whole Utilization (sum of
Seconds of Use
,Frequency of Use
, andFrequency of SMS
), and Complaints_CustomerValue (the product ofVariety of Complaints
andBuyer Worth
) to offer extra insights into buyer conduct.
3. Knowledge Normalization:
- Numerical Options: I utilized standardization (z-score normalization) to numerical options like
Cost Quantity
,Frequency of Use
,Complains
, andSeconds of Use
to make sure all options have a imply of 0 and normal deviation of 1. This step is essential for Logistic Regression, which will be delicate to the dimensions of the options. - Categorical Options: Categorical variables reminiscent of
Age Group
andSort of Service
have been encoded utilizing one-hot encoding, permitting the mannequin to course of them.
4. Practice-Take a look at Cut up:
- I cut up the dataset into 80% coaching and 20% check units utilizing
train_test_split
. Cross-validation was carried out on the coaching set to tune mannequin hyperparameters.
Knowledge Pattern:
Beneath is a pattern of the dataset after preprocessing:
This pattern showcases the shopper behaviors and options used within the churn prediction mannequin. After preprocessing and normalization, these options have been fed into the Logistic Regression mannequin for coaching and analysis.
On this mission, I take advantage of Logistic Regression as my main machine studying technique for predicting buyer churn. Logistic Regression is a extensively used classification algorithm that estimates the likelihood of a binary end result, reminiscent of whether or not a buyer will churn (1) or not (0), based mostly on enter options. The strategy is easy, interpretable, and well-suited for binary classification issues, making it a very good match for our churn prediction job.
Logistic Regression
Logistic Regression is a sort of generalized linear mannequin that’s generally used for binary classification duties. In contrast to linear regression, which predicts a steady worth, Logistic Regression predicts the likelihood of an occasion occurring (e.g., a buyer churning). The algorithm fashions the connection between the impartial variables (options) and a binary dependent variable (churn/no churn) utilizing the logistic perform (sigmoid perform). This ensures that the output is a likelihood between 0 and 1.
The Logistic Regression mannequin is mathematically expressed as:
The place:
- P(y = 1∣X) is the likelihood that the goal y (churn) equals 1, given the characteristic vector X.
- β0 is the intercept (bias time period).
- β1, β2,…, βn are the coefficients for the impartial variables (options).
- x1,x2,…, xn signify the enter options (e.g., Frequency of Use, Complaints, Name Failures).
- e is the bottom of the pure logarithm.
The mannequin transforms the linear mixture of enter options right into a likelihood utilizing the sigmoid perform. The sigmoid perform maps any actual quantity to a price between 0 and 1, making it splendid for predicting possibilities. The expected likelihood is then in comparison with a call threshold (e.g., 0.5) to categorise the output as churned (1) or not churned (0).
The choice rule for classification is:
This rule states that if the likelihood is bigger than or equal to the brink (sometimes 0.5), the mannequin predicts the shopper will churn. In any other case, it predicts that the shopper won’t churn.
Interpretation of Logistic Regression:
Every coefficient βi represents the change within the log-odds of the result (churn) for a one-unit enhance within the corresponding characteristic xi. The log-odds is the logarithm of the ratio of the likelihood of churn to the likelihood of not churning.
Mathematically:
For instance, if β1 = 0.5 for Complaints
, it implies that for each further buyer grievance, the log-odds of churn enhance by 0.5. A optimistic coefficient will increase the probability of churn, whereas a unfavorable coefficient decreases it.
Mannequin Coaching and Tuning
On this mission, I skilled the Logistic Regression mannequin on 80% of the dataset and examined it on the remaining 20%. To enhance the mannequin’s efficiency, I used GridSearchCV to tune hyperparameters, particularly the regularization energy CCC and the kind of penalty (L1 or L2). Regularization is vital for controlling overfitting and guaranteeing that the mannequin generalizes effectively to unseen information.
The parameter grid we used for tuning is as follows:
- C: The inverse of regularization energy. Smaller values of C apply stronger regularization, which helps to forestall overfitting.
- Penalty: L1 or L2 regularization. L1 regularization encourages sparsity within the mannequin (i.e., some coefficients change into zero), whereas L2 regularization penalizes massive coefficients.
The grid search recognized the optimum hyperparameters for our Logistic Regression mannequin. In our case, the most effective mannequin used L1 regularization with a C worth of 0.1. This mixture supplied a stability between mannequin complexity and predictive efficiency.
Analysis Metrics
I used the next metrics to judge the efficiency of the mannequin:
- Accuracy: The proportion of accurately predicted circumstances over the whole variety of circumstances.
- Precision: The proportion of true positives (appropriate churn predictions) out of all optimistic predictions.
- Recall: The proportion of true positives out of all precise positives.
- F1-Rating: The harmonic imply of precision and recall, offering a balanced measure of the mannequin’s efficiency.
- ROC-AUC: The world beneath the Receiver Working Attribute curve, measuring how effectively the mannequin discriminates between churned and non-churned prospects.
Dealing with Imbalanced Knowledge
One of many challenges in churn prediction is coping with imbalanced information, the place the variety of non-churned prospects is considerably increased than the variety of churned prospects. To deal with this difficulty, I used class weights within the Logistic Regression mannequin to provide extra significance to the churned class, serving to to enhance recall for this minority class. By setting class_weight='balanced'
, the algorithm routinely adjusts the weights inversely proportional to class frequencies.
Decile Evaluation for Focusing on Prospects
Past simply predicting churn, I carried out decile evaluation to section prospects into teams based mostly on their churn likelihood. By dividing prospects into deciles, I recognized the highest 20%-30% of shoppers most susceptible to churning, permitting the enterprise to focus retention efforts on those that want it most. This technique ensures that the enterprise makes use of sources successfully to maximise retention and income.
Experiment
As we all know earlier than, for this mission, I used Logistic Regression as my main machine studying technique to foretell buyer churn. Beneath, I element the parameters used, the preprocessing steps, and the analysis metrics employed.
Parameters and Regularization:
I used regularization to forestall overfitting and enhance the generalization of our mannequin. Regularization provides a penalty to massive coefficients within the mannequin to forestall it from becoming noise within the coaching information. On this case, I explored L1 (Lasso) and L2 (Ridge) regularization. The perfect mannequin was chosen utilizing GridSearchCV with a give attention to the next hyperparameters:
- C (Inverse Regularization Energy): Smaller values of C indicate stronger regularization. The search was carried out over C = [0.01,0.1,1,10,100]
- Penalty: I examined each L1 and L2 penalties to judge their influence on the mannequin’s efficiency. L1 tends to supply sparse fashions, the place irrelevant options are assigned a coefficient of zero, whereas L2 tends to distribute weights extra evenly throughout options.
I discovered that L1 regularization with C = 0.1 supplied the most effective stability between mannequin complexity and efficiency.
Cross-Validation:
To make sure that the mannequin generalizes effectively to unseen information, I used 5-fold cross-validation throughout hyperparameter tuning with GridSearchCV. Cross-validation helps keep away from overfitting by testing the mannequin on totally different subsets of the info. This ensures that our mannequin performs effectively throughout the whole dataset and isn’t overly reliant on the coaching information.
Metrics Used:
To judge the mannequin, I used a number of efficiency metrics:
- Accuracy: The proportion of appropriate predictions out of all predictions.
2. Precision: The proportion of true optimistic predictions out of all optimistic predictions made by the mannequin.
3. Recall: The proportion of precise positives (churn) that have been accurately predicted by the mannequin.
4. F1-Rating: The harmonic imply of precision and recall, balancing each metrics.
5. ROC-AUC (Receiver Working Attribute — Space Underneath Curve): Measures the mannequin’s potential to tell apart between churned and non-churned prospects. A better AUC worth signifies higher efficiency.
Outcomes
Efficiency Metrics:
- Greatest Hyperparameters: C = 0.1C, Penalty: L1 (Lasso)
- Accuracy: 85.3%
- Precision (Churned Prospects): 52%
- Recall (Churned Prospects): 88%
- F1-Rating: 0.66
- ROC-AUC: 0.89
Confusion Matrix:
The confusion matrix reveals how effectively the mannequin carried out in predicting churned and non-churned prospects:
From the confusion matrix, we are able to observe:
- The mannequin accurately predicted 80 prospects who truly churned.
- It missed 11 churned prospects.
- It incorrectly predicted 70 prospects as churned when they didn’t churn.
ROC Curve:
Beneath is the ROC Curve, illustrating the trade-off between true optimistic price and false optimistic price throughout totally different thresholds:
The ROC curve reveals a robust separation between churned and non-churned prospects, and the AUC rating of 0.93 signifies that the mannequin is extremely efficient at distinguishing between the 2 lessons. This excessive AUC worth demonstrates that the mannequin performs effectively in predicting churn, with a excessive true optimistic price and a low false optimistic price throughout totally different thresholds
Decile Evaluation
The Cumulative Achieve Chart illustrates how efficient the mannequin is in capturing churned prospects throughout totally different deciles of the shopper base. Based mostly on the chart:
- Prime 20% of Prospects: Focusing on the highest 20% of shoppers captures roughly 70% of all churned prospects.
- Prime 40% of Prospects: Specializing in the highest 40% of shoppers leads to capturing near 100% of the churned prospects.
- Past 40%: Past the highest 40% of shoppers, we attain a plateau, that means including extra prospects to the goal group doesn’t lead to capturing extra churned prospects.
Buyer Lifetime Worth (CLV) Simulation
I calculated the Buyer Lifetime Worth (CLV) utilizing the next assumptions:
- Common Transaction Worth: $100 (assumed)
- Transactions Per Yr: 12 (month-to-month)
- Churn Charge: 0.16 (16%)
Utilizing the system for CLV:
Insights and Enterprise Suggestions
How Machine Studying Solves the Enterprise Drawback:
By utilizing Logistic Regression, the mannequin precisely predicts which prospects are susceptible to churning. The insights gained from the mannequin might help the enterprise prioritize retention efforts by specializing in high-risk prospects. By predicting churn possibilities, the corporate can scale back buyer attrition, enhance buyer lifetime worth (CLV), and in the end enhance income.
Enterprise Insights:
- Complaints and Name Failure have been essentially the most important predictors of churn, that means prospects who continuously complain or expertise name points usually tend to churn.
- Focused retention efforts ought to give attention to prospects who continuously expertise name failures or file complaints, as these people usually tend to discontinue the service.
Suggestions for Enterprise Enchancment:
- Buyer Retention Campaigns: Deal with prospects within the prime 20% decile of churn likelihood. These prospects are on the highest danger and ought to be provided incentives, reductions, or enhanced buyer assist.
- Enhance Buyer Help: Decreasing complaints by bettering customer support might straight scale back churn. Implementing suggestions mechanisms and resolving points extra shortly will assist retain prospects.
- Engagement Campaigns: Promote increased utilization amongst prospects by introducing loyalty applications, providing further options, or bundling companies to extend engagement, which correlates with decrease churn.
- CLV Simulation: With a median transaction worth of $100, a churn price of 16%, and 12 transactions per 12 months, the Buyer Lifetime Worth (CLV) is estimated to be $7668.16. Decreasing the churn price would enhance this lifetime worth, demonstrating the monetary influence of buyer retention methods.
On this mission, I utilized Logistic Regression to foretell buyer churn utilizing the Iranian Churn Dataset from the UCI Machine Studying Repository. The principle purpose was to establish prospects susceptible to churn and suggest focused retention methods to extend Buyer Lifetime Worth (CLV) and optimize income. Logistic Regression was chosen attributable to its simplicity, interpretability, and effectivity, making it a perfect alternative for real-time prediction and decision-making in a enterprise context.
The outcomes of our evaluation demonstrated that the mannequin carried out effectively, attaining an AUC rating of 0.93, which signifies robust discriminative energy in distinguishing between churned and non-churned prospects. With an accuracy of 85.3%, precision of 52%, and recall of 88%, the mannequin supplied an affordable stability between predicting churned prospects accurately and minimizing false positives. The Cumulative Achieve Chart highlighted that concentrating on the highest 20% of shoppers with the best churn likelihood captured about 70% of churned prospects, whereas specializing in the highest 40% captured practically all of them. Moreover, the CLV was calculated at $7668.16, based mostly on a churn price of 16%, displaying the monetary influence of buyer retention on long-term income.
One of many key benefits of utilizing Logistic Regression on this mission was its interpretability, permitting us to obviously perceive the connection between buyer conduct (e.g., complaints, frequency of use) and the probability of churn. Whereas the mannequin could not carry out in addition to extra advanced algorithms like Random Forest or Gradient Boosting, it strikes a very good stability between predictive energy and ease of implementation, making it appropriate for enterprise environments the place selections have to be made shortly and transparently.
Nevertheless, to additional enhance machine studying efficiency, a number of avenues may very well be explored. Incorporating extra advanced fashions, reminiscent of ensemble strategies or hybrid fashions just like the Logit Leaf Mannequin (LLM), could result in improved accuracy by capturing non-linear interactions between options. Moreover, amassing extra detailed information on buyer conduct, reminiscent of sentiment evaluation from customer support interactions, would enrich the mannequin’s predictive functionality. Furthermore, implementing time-series evaluation would permit us to trace modifications in buyer conduct over time and anticipate churn extra dynamically.
Future Work
For future work, if extra time, human sources, and computational energy have been accessible, I’d give attention to implementing extra subtle fashions reminiscent of Random Forests, Gradient Boosting, and even deep studying strategies to enhance accuracy. A hybrid strategy, combining the interpretability of Logistic Regression with the segmentation capabilities of Choice Timber, might present a extra strong mannequin. Furthermore, incorporating time-series evaluation and buyer segmentation utilizing clustering strategies might assist us higher perceive evolving buyer conduct and enhance retention methods. With extra information, reminiscent of social media sentiment and customer support name transcripts, I might develop a deeper understanding of why prospects churn and additional refine my predictions. Moreover, exploring cost-sensitive studying might enhance the mannequin’s potential to deal with the imbalance in churned versus non-churned prospects, prioritizing the proper prediction of churned prospects over non-churned ones.
Dahiya, Ok., & Bhatia, S. (2015). Buyer churn evaluation in telecommunication business utilizing information mining strategies: A evaluate. IEEE Worldwide Advance Computing Convention (IACC).
Dalvi, A., Patil, A., Sonawane, R., & Panchal, A. (2016). Predicting buyer churn utilizing logistic regression approach: A case examine in banking. Worldwide Journal of Rising Expertise and Superior Engineering, 6(6), 317–323.
De Caigny, A., Coussement, Ok., & De Bock, Ok. W. (2018). A brand new hybrid classification algorithm for buyer churn prediction based mostly on logistic regression and resolution bushes. European Journal of Operational Analysis, 269(2), 760–772.
Gaur, A., & Dubey, A. (2018). A comparative examine on machine studying algorithms for churn prediction in telecom business. Worldwide Journal of Engineering & Expertise, 7(4), 3289–3293.
Iranian Churn Dataset. (n.d.). Retrieved from UCI Machine Studying Repository: https://archive.ics.uci.edu/dataset/563/iranian+churn+dataset