AboutWhat I doProjectsLabContact
  • SCIKIT-LEARN
  • TABULAR
  • CHURN

Customer Churn Prediction

Customer Churn Prediction

End-to-end ML pipeline to predict telecom customer churn: data preparation, modelling and evaluation. Code at github.com/delcenjo/customer-churn-prediction.

Keeping a telecom customer is much cheaper than winning a new one, so the useful question is not who left last month but who is about to leave. This model scores each customer by their churn probability so a retention campaign spends its budget on the accounts at risk.

  • CV ROC-AUC0.845
  • Test1,409 customers
  • Winnerlogistic regression

Accuracy lies at 26% churn

With churn as a minority event, a model that always says nobody leaves is right 74% of the time and completely useless. Candidates are compared by cross-validated ROC-AUC: logistic regression 0.845, gradient boosting 0.833, random forest 0.825.

The simple model won

Logistic regression beat both ensembles. It is the project's best reminder: the fancier model is not always the better one, and finding that out requires actually comparing rather than assuming. The winner is retrained and evaluated once on 1,409 held-out customers.

Reproducible end to end

The pipeline saves the figures (ROC curve, confusion matrix, permutation importance) next to a metrics.json, and there is a public Kaggle notebook with the full analysis for anyone who wants to follow it step by step.

Shall we connect?

Let's talk: feedback, collaboration or an opportunity.

You can write to me about a project, a technical question, to give me feedback, or about an internship or a first junior role. I always reply.

Write to me

Next projects:

Built with

PythonPyTorchscikit-learnpandasNumPyJupyterHugging FaceLangChainFastAPIPydanticDockerGitHub ActionsPrometheusGrafanaMLflowPostgreSQLGitGitHubLinuxStreamlitSQLiteAnthropicBashPyPIOllamaPythonPyTorchscikit-learnpandasNumPyJupyterHugging FaceLangChainFastAPIPydanticDockerGitHub ActionsPrometheusGrafanaMLflowPostgreSQLGitGitHubLinuxStreamlitSQLiteAnthropicBashPyPIOllama
hola@jmwebsoluciones.com