Why is this problem important to solve?
Customer segmentation is crucial because it allows businesses to better understand their customers, tailoring marketing strategies to different customer groups based on unique characteristics. This leads to improved customer engagement, increased sales, and optimized use of resources. Segmented campaigns can significantly boost click rates and overall revenue by targeting personalized communications and offerings.
What is the intended goal?
The objective is to utilize unsupervised learning techniques such as dimensionality reduction and clustering to identify the best possible customer segments from the given dataset. This will enable more effective and efficient marketing strategies, ultimately enhancing return on investment (ROI).
What are the key questions that need to be answered?
- What are the distinct customer segments within the dataset?
- What characteristics define each customer segment?
- How can these segments be leveraged to optimize marketing strategies?
- Which clustering method provides the most meaningful and actionable segments?
What is it that we are trying to solve using data science?
We aim to solve the problem of understanding customer behavior and characteristics by dividing the customer dataset into meaningful segments. This involves analyzing customer profiles, campaign conversion rates, and engagement with marketing channels to create segments that can be targeted with tailored marketing strategies. The goal is to enhance marketing efficiency and improve ROI by effectively utilizing customer data.
The dataset contains the following features:
- ID: Unique ID of each customer
- Year_Birth: Customer’s year of birth
- Education: Customer's level of education
- Marital_Status: Customer's marital status
- Kidhome: Number of small children in customer's household
- Teenhome: Number of teenagers in customer's household
- Income: Customer's yearly household income in USD
- Recency: Number of days since the last purchase
- Dt_Customer: Date of customer's enrollment with the company
- MntFishProducts: The amount spent on fish products in the last 2 years
- MntMeatProducts: The amount spent on meat products in the last 2 years
- MntFruits: The amount spent on fruits products in the last 2 years
- MntSweetProducts: Amount spent on sweet products in the last 2 years
- MntWines: The amount spent on wine products in the last 2 years
- MntGoldProds: The amount spent on gold products in the last 2 years
- NumDealsPurchases: Number of purchases made with discount
- NumCatalogPurchases: Number of purchases made using a catalog (buying goods to be shipped through the mail)
- NumStorePurchases: Number of purchases made directly in stores
- NumWebPurchases: Number of purchases made through the company's website
- NumWebVisitsMonth: Number of visits to the company's website in the last month
- AcceptedCmp1: 1 if customer accepted the offer in the first campaign, 0 otherwise
- AcceptedCmp2: 1 if customer accepted the offer in the second campaign, 0 otherwise
- AcceptedCmp3: 1 if customer accepted the offer in the third campaign, 0 otherwise
- AcceptedCmp4: 1 if customer accepted the offer in the fourth campaign, 0 otherwise
- AcceptedCmp5: 1 if customer accepted the offer in the fifth campaign, 0 otherwise
- Response: 1 if customer accepted the offer in the last campaign, 0 otherwise
- Complain: 1 If the customer complained in the last 2 years, 0 otherwise
Assumption: The data is collected in the year 2016.
- Histogram of Income (initial)
- Histogram of Income (after outlier was dropped)
- Histograms for other variables
- Bar Plot of Marital Status
- Heatmap (initial)
- Education vs Income Barplot
- Marital Status vs Income Barplot
- Number of Kids at Home vs Income
- Crosstab of Marital Status vs Number of Kids at Home
- Histogram of Age
- Histogram of Amount per Purchase
- Heatmap (New)
- Scatterplot of t-SNE Clusters
- Scatterplot of PCA Application
- KMeans Elbow Plot
- Scatterplot of KMeans (3 Clusters)
- Boxplot of KMeans (3 Clusters)
- Scatterplot of KMeans (5 Clusters)
- Boxplot of KMeans (5 Clusters)
- Scatterplot of KMedoids (5 Clusters)
- Boxplot of KMedoids (5 Clusters)
- Scatterplot of Hierarchical Clustering (3 segments)
- Boxplot of Hierarchical Clustering (3 segments)
- Boxplot of DBSCAN
- Scatterplot of Gaussian Mixture Model (5 Clusters)
- Boxplot of Gaussian Mixture Model (5 Clusters)
We evaluated multiple clustering techniques based on the silhouette score, which measures how similar an object is to its own cluster compared to other clusters. Here’s a comparison:
-
K-Means:
- For (n_clusters = 3): Silhouette score = 0.2694
- For (n_clusters = 4): Silhouette score = 0.2547
- For (n_clusters = 5): Silhouette score = 0.2337
- For (n_clusters = 6): Silhouette score = 0.2186
- Best score: K-Means with (n_clusters = 3), silhouette score = 0.2694
-
K-Medoids:
- Silhouette score for (k = 5): 0.1192
-
DBSCAN:
- (eps = 2), (min_samples = 6): Silhouette score = 0.1112
- (eps = 2), (min_samples = 20): Silhouette score = 0.3385
- (eps = 3), (min_samples = 6): Silhouette score = 0.2237
- (eps = 3), (min_samples = 20): Silhouette score = 0.3382
- Best score: DBSCAN with (eps = 2) and (min_samples = 20), silhouette score = 0.3385
-
Gaussian Mixture Model (GMM):
- (n_components = 5): Silhouette score = 0.1341
Performance Summary:
- DBSCAN with (eps} = 2) and (text{min_samples} = 20 ) had the highest silhouette score (0.3385).
- K-Means with (n_clusters = 3) provided a strong performance with a silhouette score of 0.2694.
Scope for Improvement:
- Further tuning of DBSCAN parameters (eps and min_samples) could potentially improve performance.
- Combining clustering methods or integrating domain-specific knowledge might yield better results.
- DBSCAN was highly effective in identifying well-separated clusters and managing noise points. This is beneficial for data sets with outliers or irregular cluster shapes.
- K-Means showed solid performance, especially with 3 clusters, indicating that the data might naturally group into three distinct segments.
- GMM provided a moderate performance, but offers the flexibility of soft clustering, where data points can belong to multiple clusters with different probabilities.
Key Insights:
- The data contains clear subgroups that can be identified with proper parameter tuning.
- Outlier detection is crucial for understanding the data's structure and should be integrated into the final solution.
Based on the analysis, I propose adopting DBSCAN with (text{eps} = 2) and (text{min_samples} = 20) for the following reasons:
- Highest Silhouette Score: Achieved the best-defined clusters among the methods tested.
- Flexibility: Effectively handles outliers and finds arbitrarily shaped clusters, making it versatile for various data structures.
- No Need for K: Does not require specifying the number of clusters in advance, simplifying the clustering process.
Implementation Steps:
- Cluster the Data: Use DBSCAN with the optimal parameters to cluster the data.
- Visualize and Interpret: Create visualizations to understand the clusters and their characteristics.
- Validate: Ensure the clusters make sense in the context of the problem using domain-specific knowledge.
This combination of flexibility, performance, and ease of use makes DBSCAN the best solution for your clustering needs.
































