Let's build a no-code tool for small businesses to reduce churn





Small businesses have limited purchasing spend and are limited in their choices for tools. The current economic situation, accelerated due to COVID, has made retaining existing customers a much bigger priority than acquiring new ones. 

The speakers, just using the Python ecosystem, built a no-code tool to help small businesses identify customers who have churned and are at-risk of churning. The merchants (the users of the system) can either connect their sales system or upload a CSV - and the relevant insights and analytics are provided to them. In this talk, the speakers show how they built such a tool only using Python and discuss their design choices and challenges they faced when building such a system and talk on how they solved it. 

The core machine learning part of the tool was to identify customers who are at-risk of churning. At-risk customers are identified using Survival analysis models. They predict the probability that a specific customer might churn, at various time intervals. The speakers used PySurvival and Lifelines Python packages to predict churn. They provide a blend of standard/traditional survival analysis models as well as the ability to incorporate modern deep learning architectures using PyTorch models.

The speakers built the front-end of the system using the Streamlit Python package. Streamlit is targeted towards data scientists to rapidly build UI and deploy the Machine Learning models, just using Python (No knowledge of HTML, CSS, Javascript needed).

The structure of the talk is as below:

  • Problem Statement overview (2 mins)
  • Architecture overview (1 min)
  • Data Preprocessing using Dask and Pandas (2 mins)
  • Feature Engineering using feature tools and tsfresh (1 min)
  • Predicting Churn (10 mins)
    • Survival Analysis Models using lifelines
  • API for the model using FastAPI (2 mins)
  • Building visualization using streamlit (5 mins)
    • Analytics
    • Model output
  • Building the package using Poetry (2 mins)
  • Deploying the application on Cloud  (1 min)
  • Challenges (1 min)
    • Scaling up Vs Scaling out
    • Customization of Models and UI

100% of the application was built just using Python. The core part of the tool is available as open-source.

By the end of the talk, the attendees will understand how to build a no-code micro- product using Python in less than a day.


Basic understanding of classification models in ML.

Video URL:


Content URLs:

GitHub: https://github.com/PadmajaVB/Cohort-Analysis (Repo shall be made public before the talk)

Slide deck: https://www.slideshare.net/sunitabhagwat/churn-analysis-237841042

Speaker Info:

Bargava has spent the past 17 years helping businesses, both large and small, use data and algorithms to build a moat. He's worked on large scale machine learning problems in transportation, banking, software, and networking products. His previous startup was incubated by SAP. It focused on personalization for marketers - both eCommerce as well as B2B large enterprises. He is a trained statistician academically - having done his masters at the University of Maryland, College Park. At Binaize, he is focused on helping small and medium-sized eCommerce companies improve conversion. He has presented a talk and workshop in SciPY USA, SciPy India and PyCon India in the past.

Padmaja is currently working as a Software Developer at VMware from the past 2 years, where she is working on the product that enhances customer serviceability by providing proactive recommendations. She has been building deep learning models for various use cases ranging from automatic music generation to natural language understanding using Python. She has given talks at PyCon India 2016 and PyCon US 2017, 2018. She is a data science enthusiast with a strong passion for dance and loves going on adventurous trips.

Speaker Links:

Bargava Subramanian

Twitter: @bargava

LinkedIn: https://www.linkedin.com/in/bargava/

Padmaja Bhagwat

LinkedIn: https://www.linkedin.com/in/padmajavb/

Github: https://github.com/PadmajaVB

Section: Data Science, Machine Learning and AI
Type: Talks
Target Audience: Beginner
Last Updated: