https://github.com/kevinwood15/python_ml_kmeans_project
This project uses the KMeans ML algorithm to identify segments of the broader population that form the core customer base of a company.
https://github.com/kevinwood15/python_ml_kmeans_project
cleaning-data data-science kmeans-algorithm machine-learning-algorithms pca-analysis python unsupervised-machine-learning wrangling-data
Last synced: 1 day ago
JSON representation
This project uses the KMeans ML algorithm to identify segments of the broader population that form the core customer base of a company.
- Host: GitHub
- URL: https://github.com/kevinwood15/python_ml_kmeans_project
- Owner: kevinwood15
- Created: 2025-03-07T14:02:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-07T17:59:50.000Z (over 1 year ago)
- Last Synced: 2025-03-21T18:38:45.768Z (over 1 year ago)
- Topics: cleaning-data, data-science, kmeans-algorithm, machine-learning-algorithms, pca-analysis, python, unsupervised-machine-learning, wrangling-data
- Language: Jupyter Notebook
- Homepage:
- Size: 275 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python_KMeans_Project
This project uses the KMeans ML algorithm to identify segments of the broader population that form the core customer base of a company.
I leverage two datasets, one of the general population, and one of actual customers of the company. The data is messy, so I clean it in preparation for the analysis. I engineer new variables when necessary, address missing values on features and rows and re-encode categorical features into dummies.
Using the general population data, I apply feature scaling and use principal component analysis to reduce the dimensionality. I reduce 81 features down to 33, which explains 85% of the variance.
I apply a K means model on a 25% random sample and use the elbow method to decide upon an optimal cluster number (k=21 clusters).
Lastly, I use the fits from the general population to clean, transform, and cluster the customer data and examine differences between the general population and customer data, before drawing conclusions about the typical customers, and forming recommendations on how to tailer avertising to a target group.