This project performs customer segmentation using unsupervised machine learning techniques on a mall customer dataset. It aims to group customers based on key features such as income and spending behavior to help businesses target specific customer segments more effectively.
Create a K-means clustering algorithm to group customers of a retail store based on their purchase history.
Source: Kaggle - Customer Segmentation Tutorial in Python
The dataset contains information on 200 mall customers, including:
- CustomerID
- Gender
- Age
- Annual Income (k$)
- Spending Score (1β100)
- Clone the repository:
git clone https://github.com/SafalNarsingh/Prodigy_ML_02
- Install dependencies:
pip install numpy pandas matplotlib seaborn scikit-learn
- Launch jupyternotebook:
jupyter notebook customers.ipynb
- pandas
- matplotlib
- seaborn
- scikit-learn
.
βββ data_file/
β βββ Mall_Customers.csv
βββ customer.ipynb
βββ readme.md'
- Visual analysis using histograms, boxplots, and pairplots
- Encoding of categorical variables (Gender)
- Data scaling using StandardScaler
- Optimal number of clusters determined using the Elbow Method
- Clustering using:
- K-Means algorithm
- 2D/3D cluster visualization for intuitive interpretation