# Building churn prediction models from subscriber behavior
A prepaid subscriber who used to top up every week now tops up once a month. Last Tuesday she filed her second dropped-call complaint. Yesterday, a number in her area code got ported to a competitor. None of these signals is alarming alone. Together, they are a subscriber quietly packing her bags.
Your job is to see it before she leaves.
Churn is the rate at which subscribers leave over a period, usually expressed monthly. In prepaid markets it is brutal. There is no contract, no early termination fee, and switching costs almost nothing thanks to Mobile Number Portability (MNP), the regulatory system that lets a subscriber keep their phone number when moving to a new operator.
Acquiring a new subscriber costs far more than keeping an existing one. This is widely cited across the industry and is why retention gets serious money. If you can flag an at-risk high-value subscriber a few weeks early, a retention team can intervene: a targeted data bonus, a loyalty offer, a call from care.
The trick is targeting. Blast everyone with discounts and you erode margin on people who were never going to leave. A good churn model tells you *who*, *how likely*, and ideally *why*.
A model is only as good as its inputs. In machine learning, a feature is a measurable input variable. Raw telecom data is not features; it is call detail records, top-up logs, and complaint tickets. You have to engineer signal out of it.
Here are the categories that matter for our prepaid operator.
The strongest prepaid signal is the top-up. A declining recharge pattern is the clearest "I am leaving" tell there is.
Useful features:
The *trend* matters more than the *level*. A subscriber who always tops up monthly is fine. A subscriber who dropped from weekly to monthly is the alarm.
This is where dropped-call complaints come in. Poor experience is a churn accelerant.
If a subscriber's home cell tower has a congestion problem and they filed two complaints, that is a compounding risk you can literally mapmapUsing software to automate repetitive marketing tasks and campaigns, enabling personalisation at scale across channels like email, web, and social.Voir la définition complète →.
MNP porting data is gold. Regulators and clearinghouses publish porting activity, and operators track port-out requests in near real time.
Not all churn is equal. Losing a high-value subscriber hurts more.
This is a binary classification problem: for each subscriber, predict the probability they will churn in a defined future window.
Define churn precisely. For prepaid, a common definition is no revenue-generating activity for a set number of consecutive days (say 30 or 60), because there is no formal cancellation event. Pick the window, document it, and stick to it.
Then build a labeled dataset. Take a snapshot of features at a point in time, then look forward to see who actually churned. That forward window is your label.
# Illustrative: label churn as no activity in the next 30 days
import pandas as pd
df['label_churn'] = (df['days_to_next_activity'] > 30).astype(int)
features = [
'days_since_last_topup',
'topup_freq_ratio_3m', # this month vs 3-month avg
'data_volume_trend',
'dropped_calls_7d',
'unresolved_complaints',
'offnet_call_share',
'port_out_flag',
'area_port_velocity',
'arpu',
'tenure_months',
]
X = df[features]
y = df['label_churn']Start simple. A logistic regression (a model that outputs a probability between 0 and 1) or a gradient-boosted tree model like XGBoost handles this well and, importantly, lets you explain which features drove each score. Explainability matters when a retention manager asks "why is this person flagged?"
For a solid, free grounding in the modeling workflow, Google's Machine Learning Crash Course covers classification and evaluation cleanly.
🎬 [VIDEO: "Customer ChurnCustomer ChurnChurn rate is the percentage of customers or revenue lost over a period. It measures how fast a business loses its existing customer base.Voir la définition complète → Prediction Explained" — youtube.com — a walkthrough of framing churn as classification and engineering behavioral features]
The model outputs a probability. Turning that into action requires two more decisions.
Where do you set the threshold? A subscriber scored 0.82 is high risk. But do you act at 0.5? At 0.7? This is a business call, not a math call. Higher thresholds mean fewer, more confident flags (you miss some leavers). Lower thresholds catch more leavers but waste offers on false alarms.
How do you rank? Combine churn probability with value. A subscriber with 0.6 churn probability and high ARPU may deserve intervention before one with 0.9 probability and minimal spend. A simple approach is an expected-loss score:
priority = churn_probability * monthly_ARPU
This naturally surfaces the at-risk *high-value* subscribers our hook is about.
Do not use raw accuracy. Churners are a minority, so a model that predicts "nobody churns" can look accurate and be useless.
Use:
Lift is the metric retention teams understand instantly. If the top 10 percent of your scored list contains four times the churners of a random 10 percent, that is 4x lift, and that is the value you pitch to the CFO.
Vérification des acquis
1. Why is churn considered especially severe in prepaid markets compared to contract-based ones?
2. The lesson argues that a good churn model must identify 'who, how likely, and why' rather than just flagging risk broadly. What is the primary business reason for this precision?
3. In machine learning terms, why can raw call detail records, top-up logs, and complaint tickets NOT be fed directly into a churn model as-is?
4. Select ALL correct answers. According to the lesson, which of the following are meaningful engineered features derived from recharge and spend behavior?
Sélectionnez toutes les réponses correctes.
5. Select ALL correct answers. The opening scenario describes a subscriber whose individual signals are unremarkable but collectively suggest impending churn. Which principles about churn detection does this illustrate?
Sélectionnez toutes les réponses correctes.
A score sitting in a database saves nobody. The model has to feed an operational loop.
1. Score regularly. Prepaid behavior moves fast, so weekly or even daily scoring beats monthly. A dropped-balance signal is perishable.
2. Route by segment. High-value, high-risk subscribers might get a proactive care call. Mid-value might get an automated SMS offer. Low-value might get nothing, and that is a valid choice.
3. Match the offer to the driver. This is where explainable features pay off. If the flag is driven by dropped calls, a discount will not fix a coverage problem, but an acknowledgment plus a network-fix timeline might. If it is driven by a competitor's cheaper data plan, a targeted data bonus is the right lever.
4. Hold out a control group. Always keep a randomly selected group of at-risk subscribers who receive no intervention. Compare their churn to the treated group. Without a control, you cannot prove the program worked, and you may be paying to retain people who would have stayed anyway.
Return to our subscriber. Her feature vectorfeature vectorAn embedding is a numerical vector that represents data (text, images, or items) in a way that captures meaning, so similar items sit close together in space.Voir la définition complète →: days since last top-up rising, top-up frequency ratio at 0.25 (she is topping up a quarter as often as before), two unresolved dropped-call complaints, off-net call share climbing, and her postal area showing elevated port velocity to one competitor. ARPU in the top decile.
Her churn probability comes back at 0.78. Multiply by her ARPU and she lands near the top of the priority list. The dominant features are the top-up collapse and the unresolved complaints.
The action almost writes itself: a care agent calls, resolves the coverage complaint (or explains the fix timeline), and offers a loyalty data bonus. If the port to the competitor was driven by price, she now has a reason to stay. You intervened while she was still deciding, not after she ported.