Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/bottomsnode/sct_ml_2
- Owner: BottomsNode
- Created: 2024-06-29T18:24:38.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-30T16:44:06.000Z (5 months ago)
- Last Synced: 2024-07-03T19:33:29.644Z (5 months ago)
- Topics: kmeans-clustering-algorithm, matplotlib, pandas-python, scikitlearn-machine-learning
- Language: Jupyter Notebook
- Homepage:
- Size: 20.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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-learnInstall 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_22. 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)