Customer Churn Prediction (Telecom)

Machine learning model to predict customer churn for Expresso telecom, enabling proactive retention strategies.

Executive Summary

The Expresso Customer Churn Prediction project is a machine learning initiative developed for Expresso, an African telecommunications company. The primary goal is to predict customer churn, defined as a customer being inactive (no transactions) for 90 days. By identifying "at-risk" customers through behavioral and profile data, the company can deploy proactive retention strategies to mitigate revenue loss and improve customer loyalty. The solution utilizes a Logistic Regression model within a Scikit-learn pipeline to output probability-based risk scores.

Methodology

  • Data Acquisition: Used trainhackathon.csv for model training and Testhackathon.csv for churn probability prediction.
  • Feature Characterization: Features classified into numerical and categorical.
  • Preprocessing: Missing values imputed with SimpleImputer, numerical features scaled using StandardScaler, and categorical variables encoded via OneHotEncoder.
  • Model & Validation: Logistic Regression implemented in a Scikit-learn Pipeline and evaluated using cross-validation with Log-Loss scoring.
Correlation Analysis

Feature correlation matrix showing key churn predictors

Findings

Strongest Churn Driver

Regularity
usage consistency

Strongest negative correlation with churn; reduced usage consistency sharply increases churn risk.

User Activity Effect

Frequency
recharges & transactions

Higher recharge and transaction frequency significantly lowers the probability of churn.

Data Usage Impact

Data Volume
mobile data usage

Higher data consumption is associated with better retention; data users churn less than voice-only users.

Customer Tenure Insight

24+ Months
customer tenure

Most customers are long-term users, indicating churn is driven by behavioral shifts rather than early drop-off.

Voice Assistant for FAQs

AI-powered voice assistant that transcribes speech, understands FAQs, and responds with natural voice output using FastAPI.

Executive Summary

The Voice FAQ Assistant is an end-to-end AI system for automated voice-based customer support. It converts spoken questions into instant spoken answers. The system uses Whisper for speech-to-text and Sentence Transformers for intent-based semantic search. Unlike keyword matching, it understands user intent. This removes the friction of manual FAQ search and enables hands-free, low-latency access to Cowrywise-specific support information.

Methodology

  • Audio Processing: Captured live voice input and reduced background noise using librosa and noisereduce, with loudness normalization via pydub.
  • Speech Recognition: Transcribed audio using the Whisper base model with prompt biasing for domain-specific terms.
  • Text Processing: Applied spaCy lemmatization and encoded queries using the all-MiniLM-L6-v2 transformer.
  • Semantic Retrieval: Matched query embeddings to a precomputed FAQ embedding matrix using cosine similarity.
  • Fallback Logic: Implemented query reformulation for low-similarity cases to improve brand-specific matching.
  • Speech Output: Generated voice responses with gTTS and streamed them to the frontend using FastAPI.
Voice Assistant for FAQ

Snapshot of the voice assistant interface

Findings

Intent-Based Retrieval

Semantic Match
query understanding

The assistant maps varied user phrasings to the correct FAQ by understanding intent rather than relying on keyword matching.

Real-Time Performance

Low Latency
fast inference

Using Whisper (base) and MiniLM enables real-time transcription and response suitable for live web deployment.

Knowledge Base Scale

500+ FAQs
semantic search

The system efficiently retrieves the most relevant answer from a large, domain-specific FAQ dataset.

Context Recovery Logic

Fallback Strategy
ambiguity handling

Low-confidence queries are reformulated with added brand context, improving successful matches for ambiguous questions.

$

Term Deposit Subscription Prediction

Built a Decision Tree classifier to predict customers likely to subscribe to a term deposit and improve marketing strategies.

Executive Summary

Banks often rely on broad, inefficient marketing for term deposits, leading to low conversion and customer fatigue. This project builds a Decision Tree Classifier that predicts subscription likelihood with 82.9% accuracy. Trained on 11,162 customer records, the model enables targeted outreach by identifying high-probability subscribers.

Methodology

  • Data Preparation: Processed 11,162 customer records using label encoding for categorical features and standard scaling for numerical variables.
  • Feature Analysis: Performed EDA to uncover key behavioral drivers, with education level and professional status emerging as strong signals.
  • Model Design: Trained a Decision Tree Classifier to produce interpretable, rule-based targeting logic.
  • Optimization: Applied grid search and tree pruning to reduce overfitting and improve generalization.
  • Validation: Used 5-fold cross-validation to confirm model stability and performance.
Top 3 Important Features

Top 3 Important Features

Job Category Distribution

Job Category Distribution by Subscription Status

Findings

High Predictive Accuracy

82.9%
model accuracy

The Decision Tree Classifier predicts term deposit subscriptions with 82.9% accuracy, significantly improving targeted outreach over random marketing.

Primary Churn Driver

78%
feature importance

Call duration is the most critical factor for predicting subscriptions, making engagement time the strongest indicator of customer interest.

High-Conversion Demographics

Sec/Mgmt
education & role

Customers with secondary education and management roles had the highest subscription rates, while single individuals also converted at higher percentages relative to their group size.

Financial Health Correlation

No Defaults
credit history

Customers with no loan defaults and no active loans were most likely to subscribe, highlighting financial stability as a key factor.

Effective Re-Engagement

50%
previous non-subscribers converted

Persistent, timed follow-ups converted nearly half of previously uninterested customers, demonstrating the power of targeted re-engagement campaigns.

Marketing Campaign ROI

Measuring and optimizing the return on investment across digital marketing channels.

Executive Summary

This analysis focused on evaluating the effectiveness of various marketing channels and campaigns. By tracking key metrics and calculating ROI, I identified the most efficient channels and provided recommendations for budget allocation.

Methodology

  • Multi-Touch Attribution modeling across all digital channels.
  • ROI Calculation using cost-per-click, conversion rate, and lifetime value data.
  • Channel Performance Analysis with A/B testing for campaign variants.
Marketing Analytics

Multi-channel attribution model

Campaign Performance

Campaign performance metrics over time

Findings

Email Marketing ROI

420%
return

Email campaigns generated the highest ROI at 420%.

Social Media Engagement

+85%
increase

Social media engagement increased by 85% with new content strategy.

Cost Per Acquisition

-32%
reduction

Optimized campaigns reduced CPA by 32% across all channels.

Car Price Prediction

Built machine learning models to predict the resale value of used cars, improving inventory turnover in volatile markets.

Executive Summary

The used-car market suffers from pricing inefficiencies caused by information asymmetry. This project delivers a machine learning valuation engine that predicts fair resale prices with high precision. By replacing subjective pricing with data-driven appraisals, the solution helps dealers standardize trade-ins, reduce margin leakage, and improve inventory turnover in volatile markets.

Methodology

  • Data Acquisition: Analyzed car data.csv with 301 vehicle records and 9 features.
  • Feature Categorization: Split features into numerical (Year, Present_Price, Driven_kms, Owner) and categorical (Fuel_Type, Selling_type, Transmission).
  • Exploratory Analysis: Inspected data structure, distributions, and feature uniqueness to understand pricing patterns.
  • Preprocessing: Planned outlier handling, missing value treatment, and categorical encoding using OneHotEncoder and TargetEncoder.
  • Modeling: Evaluated multiple regression models, including Linear Regression, Random Forest Regressor, and Gradient Boosting Regressor.
  • Evaluation: Assessed performance using MSE, MAE, and R² score.
Comparison of the 3 trained prediction models

Comparison of the 3 trained prediction models

OLS Regression Results

Summary table of OLS regression results, showcasing key performance metrics like R-squared (0.833) and F-statistic.

Findings

Pricing Accuracy

R² = 0.83
model performance

The model predicts resale prices with high accuracy, reducing underpricing risk and helping sellers protect profit margins.

Primary Value Driver

Vehicle Age
depreciation factor

Car age is the strongest driver of resale value, enabling data-backed timing decisions for inventory liquidation.

Inventory ROI Insight

Mid-Range Cars
higher resale margins

High-priced cars lose value faster early on, while mid-range vehicles consistently offer stronger resale returns.