Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bottomsnode/sct_ml_2

This Python script demonstrates how to perform customer segmentation using K-Means clustering based on annual income and spending score.
https://github.com/bottomsnode/sct_ml_2

kmeans-clustering-algorithm matplotlib pandas-python scikitlearn-machine-learning

Last synced: 1 day ago
JSON representation

This Python script demonstrates how to perform customer segmentation using K-Means clustering based on annual income and spending score.

Awesome Lists containing this project

README

        

# Customer Segmentation Using K-Means Clustering
![Customer Segmentation Using K-Means Clustering](https://github.com/BottomsNode/SCT_ML_2/blob/main/Task%202%20%20ML.png)
This Python script demonstrates how to perform customer segmentation using K-Means clustering based on annual income and spending score.

## Dataset

The dataset used (`Mall_Customers.csv`) contains the following columns:

- `CustomerID`: Unique ID assigned to each customer
- `Gender`: Gender of the customer
- `Age`: Age of the customer
- `Annual Income (k$)`: Annual income of the customer in thousands of dollars
- `Spending Score (1-100)`: Score assigned by the mall based on customer behavior and spending nature

## Dependencies

Make sure you have the following libraries installed:

- pandas
- matplotlib
- scikit-learn

Install them using pip if necessary:

```bash
pip install pandas matplotlib scikit-learn
```

## Running the Script:
1. Clone the Repository:
git clone [https://github.com/BottomsNode/SCT_ML_2.git](https://github.com/BottomsNode/SCT_ML_2)

cd SCT_ML_2

2. Download the Dataset:
Place the Mall_Customers.csv dataset in the same directory as the Python script.

3. Run the Script:
Execute the Python script customer_segmentation.py:
python customer_segmentation.py
This will generate an animated visualization of the K-Means clustering process.

## Author:
[BottomsNode](https://github.com/BottomsNode)