Skip to content

SafalNarsingh/Prodigy_ML_02

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§β€β™‚οΈπŸ§β€β™€οΈ Customer Segmentation in Python

Prodigy Infotech Machine Learning Task 2

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.


Problem Statement

Create a K-means clustering algorithm to group customers of a retail store based on their purchase history.


πŸ“Š Dataset

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)

πŸš€ How to Run

  1. Clone the repository:
git clone https://github.com/SafalNarsingh/Prodigy_ML_02
  1. Install dependencies:
  pip install numpy pandas matplotlib seaborn scikit-learn 
  1. Launch jupyternotebook:
jupyter notebook customers.ipynb

πŸ“¦ Requirements

  • pandas
  • matplotlib
  • seaborn
  • scikit-learn

πŸ“ Files

.
β”œβ”€β”€ data_file/
β”‚   └── Mall_Customers.csv
β”œβ”€β”€ customer.ipynb
└── readme.md'

πŸ”§ Features

  • 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

About

K-Means Clustering using Kaggle Dataset

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published