Will this customer leave?
Explore how a customer's account and services affect their estimated likelihood of churn using a trained logistic regression model.
Model and evaluation notes
The fitted scikit-learn 1.6.1 pipeline is reproduced in JavaScript using its learned numeric StandardScaler parameters, one-hot encoding categories, logistic regression coefficients and intercept. Categorical indicators are not scaled. No retraining is performed in the browser.
Data split: 4,225 training, 1,409 validation and 1,409 test customers. Preprocessing is fitted within each training fold during 5-fold cross-validation (mean ROC-AUC: 0.848). The 0.38 threshold was selected for the best validation F1-score on a grid from 0.05 to 0.95 in steps of 0.01.
At the fixed 0.38 threshold, test accuracy is 77.64%, ROC-AUC 0.843, churn precision 56.5%, recall 68.7% and F1-score 0.620. Of 374 actual churn customers, 257 were identified, 117 were missed, and 198 non-churn customers were flagged.
These remain exploratory results: this test split was already inspected during earlier experiments. Preprocessing and threshold selection are now separated correctly, but the test set is not a new independent holdout. Probabilities have not been separately calibrated. This demo is not validated for any real telecom provider.
Service options are kept consistent: customers without phone service use “No phone service” for multiple lines; customers without internet use “No internet service” for internet add-ons.