This project aims to analyze the shopping behaviors and demographic profiles of customers visiting a mall using various clustering techniques. The insights gained from this analysis can help tailor marketing strategies, improve customer engagement, and enhance the shopping experience through targeted offers and services.
- Dataset
- Data Cleaning
- Data Transformation
- Clustering Techniques
- Results
- Conclusion
- How to Run
- Dependencies
- License
The Mall Shoppers Customer Segmentation dataset includes the following features:
CustomerID
: A unique identifier for each customerAge
: Age of the customerGender
: Gender of the customerAnnual Income (k$)
: Annual income of the customer in thousands of dollarsSpending Score (1-100)
: A score assigned based on customer behavior and spending nature
- Checked for null values and found none.
- Checked for duplicate values and found none.
- Applied Min-Max Scaling to standardize features to a range [0, 1].
- Applied Z-Scaling (Standardization) to standardize features to have a mean of 0 and a standard deviation of 1.
Implemented the K-means clustering algorithm from scratch, initializing centroids randomly, assigning clusters based on the nearest centroids, and updating centroids iteratively until convergence.
Used the KMeans
class from the sklearn.cluster
module to apply K-means clustering and compared the results with the implemented version.
Implemented the K-medoids clustering algorithm from scratch, initializing medoids randomly, assigning clusters based on the nearest medoids, and updating medoids iteratively until convergence.
Performed agglomerative hierarchical clustering using Ward's method and visualized the results with a dendrogram.
Applied DBSCAN to identify clusters based on density and effectively handled noise in the data.
The project identified distinct customer segments based on age, annual income, and spending score using various clustering techniques. The clustering results were visualized and analyzed to provide insights into customer behaviors.
The analysis demonstrated the effectiveness of different clustering techniques in segmenting mall customers. These insights can be leveraged by businesses to develop targeted marketing strategies, personalize customer experiences, and improve overall customer satisfaction.
-
Clone the repository:
git clone https://github.com/Geo-y20/Mall-Shoppers-Customer-Segmentation-Analysis.git cd mall-shoppers-customer-segmentation
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the Jupyter Notebook:
jupyter notebook Mall_Shoppers_Analysis.ipynb
- pandas
- numpy
- scikit-learn
- scipy
- matplotlib
Install the dependencies using:
pip install pandas numpy scikit-learn scipy matplotlib