Random forest found 36 more churning bank customers than regression, boosting found 2 more
A bank can call only 10% of its customers, so it needs a short list of those who are about to leave. On the open BankChurners dataset, logistic regression found 163 churners among the 203 selected customers, the random forest found 199 (36 more), and boosting found 201. Across ten new splits, the forest found on average 32 more cases than regression, and boosting added only 2.6 on top of the forest. So when calls are limited, count hits in the list rather than the model's overall score.
AI-processed from Хабр: Машинное обучение; edited by Hamidun News
When a bank wants to retain customers, it cannot call everyone: a call center has a limited budget, say 10% of the base. So the model needs to produce a short list of those most likely to leave. The author of the Habr review tested on open data how much more complex models outperform simple logistic regression when the list is capped. The result on the original test: out of 203 selected customers, regression found 163 churners, the random forest found 199 (36 more), and gradient boosting found 201, that is, two more than the forest.
How the experiment was built
The author used the BankChurners dataset from Kaggle: 10,127 credit card holders, of whom 1,627 left (about 16%). A model that always predicts "the customer will stay" would be right in almost 84% of cases while missing all the churn. That is why the overall share of correct answers says nothing here.
The customer ID, the churn label itself, and two fields with scores from a third-party classifier were removed from the features, so that the answer would not leak into the inputs. That left 19 features: card characteristics and transaction aggregates. The data was split into training (6,076 rows), a separate calibration set (2,025), and a test set (2,026 customers, 326 of whom churned). Parameters were tuned with five-fold cross-validation inside the training data only. The models compared were logistic regression, a random forest of 200 trees, and gradient boosting of 200 trees with depth 3.
Each model selected from the test set the 203 customers (10%) with the highest risk score. Boosting's list had 99% precision: 201 churners among the 203 selected. Its recall was 61.7%: the same 201 people, measured against all 326 churners in the test set. Random selection would have produced about 33 hits, so boosting's list was 6.15 times better than chance.
Where the difference exists and where it barely does
The main gain comes from moving from regression to the forest. Across ten additional splits with different seeds, the forest found more churners than regression in every run: by 26 to 40 cases, 32 on average. Boosting led the forest by 0 to 5 cases, 2.6 on average. In eight of the runs it was ahead, and in two the results matched.
Boosting's AP score (average precision over the whole ranking) on the test set was 0.971, versus 0.944 for the forest, and the gap looks substantial. But in the actual list of 203 customers, it came down to two extra hits. The reason is that the lists nearly overlap: 171 customers appeared in both, and 169 of them churned. The lists differed on only 32 people. In the forest-unique part of the list, 30 customers churned; in the boosting-unique part, all 32 did.
List size changes the picture. In the top 5% (102 customers), the forest and boosting each found 102 cases, and regression found 90. In the top 20% (406 customers), boosting found 315 of 326, the forest found 307, and regression found 253. The longer the list, the wider boosting's lead over the forest. But if only 10% of customers can be called, that lead barely matters.
Calibration (aligning scores with actual probabilities) did not change the composition of the top 10%: all three models kept the same number of hits. Isotonic calibration lowered boosting's log loss from 0.081 to 0.077, while it made both metrics worse for regression. If you only need a call list, calibration has little effect on the result. If you use the probabilities to estimate expected revenue, it is needed.
Limitations and practical takeaway
The author herself lists what the experiment does not prove:
- All runs use one dataset, the test samples may overlap, and hyperparameters were tuned on the original training data. Transferring the results to another portfolio requires an independent sample.
- The CSV has no dates, so it is impossible to check whether the aggregates were known a month before the customer left. The metrics describe retrospective recognition of the label, not a real forecast.
- The experiment shows how many churners made it onto the list, but not how many of them could have been retained by a call. That would require contact data and their outcomes.
For a practitioner, the takeaway is this. A nonlinear model instead of logistic regression delivers a tangible gain: on the test set it is 36 more customers found at the same budget, and on average across ten splits, 32. When choosing between the forest and boosting, look not at the difference in AP but at the number of hits under your real contact limit, and repeat the check on several splits. If the difference amounts to a couple of customers, take the model that is easier to maintain. Before deploying to production, verify that the features are actually available at prediction time, not appearing only after the customer has already left.
- Nov 21, 2026TabPFN-3.5 Tops the TabArena Leaderboard, but Boosting Wins on Very Large Tables
- Nov 21, 2026A churn model with class weights counted 6,867 departures instead of the real 2,150
- Jul 11, 2026LSTM beats Random Forest and Naive Bayes at tweet sentiment analysis with 0.92 ROC-AUC
- Nov 21, 2026A 30-Day Moving Average Beat LightGBM: It Catches 41% of Lima's Incidents in 5% of Cells
Key Questions Answered
How the experiment was built?
The author used the BankChurners dataset from Kaggle: 10,127 credit card holders, of whom 1,627 left (about 16%). A model that always predicts "the customer will stay" would be right in almost 84% of cases while missing all the churn. That is why the overall share of correct answers says nothing here. The customer ID, the churn label itself, and two fields with scores from a third-party classifier were removed from the features, so that the answer would not leak into the inputs.
Where the difference exists and where it barely does?
The main gain comes from moving from regression to the forest. Across ten additional splits with different seeds, the forest found more churners than regression in every run: by 26 to 40 cases, 32 on average. Boosting led the forest by 0 to 5 cases, 2.6 on average. In eight of the runs it was ahead, and in two the results matched. Boosting's AP score (average precision over the whole ranking) on the test set was 0.971, versus 0.944 for the forest, and the gap looks substantial.
What are the key details on Limitations and practical takeaway?
The author herself lists what the experiment does not prove: All runs use one dataset, the test samples may overlap, and hyperparameters were tuned on the original training data. Transferring the results to another portfolio requires an independent sample. The CSV has no dates, so it is impossible to check whether the aggregates were known a month before the customer left. The metrics describe retrospective recognition of the label, not a real forecast.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
Waitlist: free vibecoding intensive + AI digest
Leave your email to reserve a spot in the free 2-day intensive and get the AI stories that matter.