Churn analysis - Which customers are likely to leave in the next few months?

people leaving a building
Data Science
Churn prediction

The challenge

The energy provider puts great value on service, but few activities have been carried out in the area of churn prevention. In general, energy providers rarely have a centralized 360-degree view of customers. On the contrary, customer data is often stored in a very fragmented manner (partly due to data security and privacy regulations), and is difficult to integrate into a uniform data model for analysis. However, a uniform data model is the prerequisite to identify customers at risk of churn.

Our solution

We choose a simple setup consisting of a data port (for secure data storage and management) and a Jupyter environment for predictive model training and serving. Data was extracted from the SAP system and anonymized in order to comply with data protection regulations. Contiamo used state-of-the-art machine learning libraries (Catboost and CoxPH among other) for analysis and to generate the churn predictions. For the first real-world testing of the results, the customer decided to export the ranking (including background information) as a CSV file. In the future, the predictions can be uploaded directly to the customer's databases.

Tech stack


The project

To reduce customer workload and overhead costs, Contiamo has introduced a simple but  efficient system that delivers results in a very short time. The chosen tools naturally allow for easy extension and integration into the customers’ ecosystem later on.

We defined project phases in advance and had regular meetings for two-way discussions of the data and to present our results:

  1. Kickoff workshop to identify available data, discuss hypotheses on churn reasons and define the prediction target
  2. Data transfer with continuous support
  3. Data cleaning and preparation so that transformed datasets are suitable for machine learning and can be furthermore be reused for other analytical questions
  4. Data investigation and churn analysis in both Tableau and Jupyter notebooks
  5. Model preparation: identification of churn-influencing factors (thus strong predictors for the final machine learning model)
  6. Modelling: Creation of snapshots of the customer journey and training & testing of the churn prediction model
  7. Backtesting and generation of the output: churn predictions for customers including risk factors
  8. Real-world testing with collaboratively discussed prevention measures

Achieved benefits

tick mark

43% preventable cancellations

tick mark

360-degree customer insights

tick mark

Churn prediction

The client was looking for a way to prevent customer churn through data analytics. The Contiamo team developed a predictive model that showed which customers were most likely to quit soon, including the most relevant risk factors for these customers. This explainable model design and the good prediction rate (up to 43% in the most at-risk group) enabled the energy provider to take targeted measures to prevent churn of customers at highest risk. The model highlighted new topics for further analyses: e.g., personalizability of tariff suggestions and customer service support with recommendations for actions.

Are you interested in more information? Let's talk about your current topics and challenges!