Skip to content

Repository files navigation

Customer Personality Analytics & Segmentation System

A comprehensive machine learning solution that analyzes customer behavior patterns and automatically segments customers into distinct groups for targeted marketing strategies.

Project Overview

This project implements an end-to-end customer analytics pipeline that processes demographic and behavioral data to identify distinct customer segments using advanced machine learning techniques. The system analyzes 2,240+ customer records across 29 features and provides actionable business insights.

Input Process Output Flow:

  • Input: Customer demographic data, spending patterns, purchase behaviors
  • Process: Data cleaning, feature engineering, K-means clustering with statistical validation
  • Output: Customer segments with targeted marketing recommendations

Key Features

  • Automated Data Pipeline: Complete data preprocessing with missing value handling and outlier detection
  • Advanced Analytics Engine: Statistical analysis, correlation mapping, and distribution visualization
  • Machine Learning Clustering: K-means algorithm with optimal cluster determination using elbow method and silhouette analysis
  • Business Intelligence Module: Automated cluster profiling and customer behavior analysis
  • Interactive Visualizations: Comprehensive plots, heatmaps, and comparative analysis charts
  • Strategic Recommendations: Business-ready marketing strategies for each customer segment
  • Performance Optimization: Model fitting completed in 0.0185 seconds

Technologies Used

  • Python 3.7+
  • Data Processing: Pandas, NumPy
  • Machine Learning: Scikit-learn, KMeans Clustering
  • Visualization: Matplotlib, Seaborn, Yellowbrick
  • Statistical Analysis: SciPy
  • Environment: Google Colab / Jupyter Notebook

Dataset Information

  • Size: 2,240 customers — 29 features
  • Data Types: Demographics, spending patterns, campaign responses, purchase behaviors
  • Key Features:
    • Customer demographics (Age, Income, Education, Marital Status)
    • Spending categories (Wines, Fruits, Meat, Fish, Sweets, Gold)
    • Purchase channels (Web, Catalog, Store)
    • Campaign responses and engagement metrics

Key Findings

Customer Segments Identified:

Cluster 0: Budget-Conscious Customers (62.8% - 1,406 customers)

  • Average Income: $39,591
  • Average Spending: $202
  • Characteristics: Price-sensitive, less frequent purchases, value-oriented

Cluster 1: Premium Customers (37.2% - 834 customers)

  • Average Income: $73,558
  • Average Spending: $1,286
  • Characteristics: High-value customers, wine enthusiasts, premium product preference

Business Impact:

  • Identified that 37% of customers drive majority of revenue (6x higher spending)
  • Clear segmentation enables targeted marketing strategies
  • Potential for 15-25% improvement in campaign conversion rates

How to Run

Prerequisites

pip install pandas numpy matplotlib seaborn scikit-learn scipy yellowbrick

Execution Steps

  1. Clone/Download the project files
  2. Upload dataset: Ensure Customer_Personality_Segmentation.csv is accessible
  3. Run the analysis:
    # Load and run the complete analysis
    python Final_Project_UnstructuredData.py
  4. View results: Generated visualizations and business recommendations

Alternative: Google Colab

  1. Upload the .ipynb file to Google Colab
  2. Mount Google Drive and upload the dataset
  3. Run all cells to execute the complete pipeline

Model Performance

  • Optimal Clusters: 2 (determined via silhouette analysis)
  • Silhouette Score: 0.3772 (indicating good cluster separation)
  • Processing Time: 0.0185 seconds
  • Validation: Both elbow method and silhouette analysis used for robust validation

Business Recommendations

Immediate Actions (1-3 months):

  • Implement customer database segmentation
  • Launch targeted email campaigns for each segment
  • Develop segment-specific promotional strategies

Strategic Initiatives (4-12 months):

  • Dynamic pricing strategies
  • Two-tier loyalty program implementation
  • Personalized product recommendations

Future Enhancements (Year 2+):

  • Predictive customer lifetime value models
  • AI-driven personalization engine
  • Real-time segmentation updates

Visualizations Generated

  • Distribution analysis histograms and boxplots
  • Correlation matrix heatmap
  • Elbow curve for optimal cluster selection
  • Silhouette score analysis
  • Cluster profiling charts (boxplots and bar charts)
  • Customer segment comparison visualizations

Future Improvements

  • Real-time Processing: Implement streaming data pipeline for live segmentation
  • Deep Learning: Explore neural network-based clustering techniques
  • Predictive Analytics: Add customer churn prediction and lifetime value forecasting
  • Web Dashboard: Create interactive business intelligence dashboard
  • API Development: Build REST API for real-time customer scoring

Technical Highlights

  • Statistical Rigor: Multiple validation techniques for cluster optimization
  • Scalable Architecture: Efficient processing of large datasets
  • Business Focus: Technical analysis translated into actionable strategies
  • Code Quality: Well-documented, modular, and reusable code structure

Key Learnings

  • Importance of using multiple validation metrics (elbow method vs silhouette analysis)
  • Strategic handling of missing data using domain-appropriate imputation
  • Translation of technical clustering results into business value propositions
  • Balancing statistical rigor with business practicality

Contact

Project Developer: Shreyansh Goindi
Email: shreyanshgoindi@gmail.com


This project demonstrates end-to-end data science capabilities from raw data analysis to strategic business recommendations, showcasing both technical proficiency and business acumen.

About

ML-powered customer segmentation system that analyzes 2,240+ customer records to identify distinct behavioral patterns and generate targeted marketing strategies. Built with Python, scikit-learn, and advanced clustering algorithms. ⚡ 0.0185s processing time

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages