{"id":26568221,"url":"https://github.com/rohitinu6/customer-segmentation-ml","last_synced_at":"2026-04-15T08:38:39.736Z","repository":{"id":283832372,"uuid":"953045272","full_name":"rohitinu6/Customer-Segmentation-ML","owner":"rohitinu6","description":"Customer segmentation using K-Means clustering and t-SNE visualization for better customer insights.","archived":false,"fork":false,"pushed_at":"2025-03-22T12:56:12.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T13:39:36.117Z","etag":null,"topics":["customer-segmentation","data-science","kmeans-clustering","machine-learning","python","unsupervised-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rohitinu6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-22T12:52:08.000Z","updated_at":"2025-03-22T12:56:15.000Z","dependencies_parsed_at":"2025-03-22T13:49:46.744Z","dependency_job_id":null,"html_url":"https://github.com/rohitinu6/Customer-Segmentation-ML","commit_stats":null,"previous_names":["rohitinu6/customer-segmentation-ml"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitinu6%2FCustomer-Segmentation-ML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitinu6%2FCustomer-Segmentation-ML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitinu6%2FCustomer-Segmentation-ML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitinu6%2FCustomer-Segmentation-ML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rohitinu6","download_url":"https://codeload.github.com/rohitinu6/Customer-Segmentation-ML/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245013744,"owners_count":20547175,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["customer-segmentation","data-science","kmeans-clustering","machine-learning","python","unsupervised-learning"],"created_at":"2025-03-22T19:35:02.608Z","updated_at":"2026-04-15T08:38:34.702Z","avatar_url":"https://github.com/rohitinu6.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Customer Segmentation using Unsupervised Learning\n\nThis project implements customer segmentation using unsupervised learning techniques, specifically K-Means clustering. The dataset contains various customer attributes which are used to identify distinct customer groups.\n\n## Table of Contents\n- [Overview](#overview)\n- [Technologies Used](#technologies-used)\n- [Dataset](#dataset)\n- [Project Structure](#project-structure)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Results](#results)\n- [Evaluation Metrics](#evaluation-metrics)\n- [License](#license)\n\n## Overview\nCustomer segmentation is a key strategy for businesses to understand customer behavior and personalize marketing. In this project:\n\n1. We preprocess and clean the dataset.\n2. Perform exploratory data analysis (EDA) and visualize key insights.\n3. Apply t-SNE for dimensionality reduction.\n4. Use the K-Means algorithm to cluster customers.\n5. Evaluate the model using the elbow method and silhouette score.\n\n## Technologies Used\n- Python 3.13\n- Libraries:\n    - Pandas (data manipulation)\n    - Numpy (numerical computations)\n    - Matplotlib \u0026 Seaborn (data visualization)\n    - Scikit-learn (machine learning)\n\n## Dataset\nThe dataset contains customer information such as:\n- Marital Status\n- Income\n- Number of Items Purchased\n- Date of Joining (Dt_Customer)\n\nEnsure that the dataset is placed in the following directory before running the code:\n\n```\nD:/VIT Bhopal/GitHub/ML Projects/Customer Segmentation using Unsupervised Learning/Data.csv\n```\n\n## Project Structure\n```\n├── Customer Segmentation (Main Directory)\n    ├── Data.csv (Dataset)\n    ├── main.py (Main Python Script)\n    └── README.md (Project Documentation)\n```\n\n## Installation\nEnsure Python 3.13 is installed. Clone this repository and install the required libraries:\n\n```bash\n# Clone the repository\ngit clone https://github.com/rohitinu6/Customer-Segmentation-ML.git\ncd customer-segmentation\n\n# Create a virtual environment\npython -m venv venv\nsource venv/bin/activate # On Windows: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n## Usage\nRun the main Python script:\n\n```bash\npython main.py\n```\n\nThe script performs:\n1. Data cleaning and preprocessing.\n2. Exploratory data analysis (EDA).\n3. Dimensionality reduction (t-SNE).\n4. K-Means clustering.\n5. Model evaluation with the silhouette score.\n\n## Results\n### Data Visualization\n- Distribution of categorical columns.\n- Feature correlation heatmap.\n- t-SNE projection for dimensionality reduction.\n\n### Clustering Analysis\n- Elbow method to determine the optimal number of clusters.\n- Visualized customer segments using t-SNE projection.\n\n## Evaluation Metrics\n1. **Inertia (Within-Cluster Sum of Squares)**: Measures how tightly data points are grouped within a cluster.\n2. **Silhouette Score**: Measures how well clusters are separated; a higher score indicates better-defined clusters.\n\nThe silhouette score for K=5 (optimal clusters) is printed during execution.\n\n## License\nThis project is licensed under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohitinu6%2Fcustomer-segmentation-ml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohitinu6%2Fcustomer-segmentation-ml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohitinu6%2Fcustomer-segmentation-ml/lists"}