https://github.com/imosudi/unsupervised-ml-kmeans-analysis
K-Means clustering analysis using synthetic datasets generated with scikit-learn, including meshgrid visualisation, silhouette score evaluation, and investigation of cluster count and random seed effects.
https://github.com/imosudi/unsupervised-ml-kmeans-analysis
clustering data-analysis jupyter-notebook kmeans kmeans-clustering machine-learning matplotlib python3 scikit-learn silhouette-score unsupervised-learning
Last synced: about 12 hours ago
JSON representation
K-Means clustering analysis using synthetic datasets generated with scikit-learn, including meshgrid visualisation, silhouette score evaluation, and investigation of cluster count and random seed effects.
- Host: GitHub
- URL: https://github.com/imosudi/unsupervised-ml-kmeans-analysis
- Owner: imosudi
- License: mit
- Created: 2026-05-14T16:56:09.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-14T19:08:55.000Z (about 1 month ago)
- Last Synced: 2026-05-14T19:28:54.016Z (about 1 month ago)
- Topics: clustering, data-analysis, jupyter-notebook, kmeans, kmeans-clustering, machine-learning, matplotlib, python3, scikit-learn, silhouette-score, unsupervised-learning
- Language: Jupyter Notebook
- Homepage:
- Size: 1.77 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unsupervised ML - K-Means Clustering Analysis









This project explores unsupervised machine learning using the K-Means clustering algorithm on synthetic datasets generated with scikit-learn. The analysis includes cluster visualisation, silhouette score evaluation, and parameter sensitivity experiments involving cluster count and random seed variation.
## Deployment
Clone the repository and run the notebook or Python script locally.
### Linux/Mac
```bash
git clone https://github.com/imosudi/unsupervised-ml-kmeans-analysis.git
cd unsupervised-ml-kmeans-analysis
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```
### Windows
```bash
git clone https://github.com/imosudi/unsupervised-ml-kmeans-analysis.git
cd unsupervised-ml-kmeans-analysis
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
```
Run:
```bash
python main.py
```
Or launch Jupyter Notebook:
```bash
jupyter notebook
```
## Project goals
- Generate synthetic datasets using `sklearn.datasets.make_classification`
- Apply K-Means clustering on multi-class datasets
- Visualise clustering regions using meshgrid decision boundaries
- Evaluate clustering quality using silhouette scores
- Analyse the impact of:
- Different cluster counts (`k`)
- Different random seeds
- Compare clustering stability and performance
- Strengthen practical understanding of unsupervised machine learning
## Project Structure
```
unsupervised-ml-kmeans-analysis/
├── assets/
│ └── screenshots/ # Screenshots for the analysis report
│ ├── task1.png
│ ├── task3.png
│ ├── task5_1.png
│ └── task5_2.png
├── doc/
│ ├── assets/
│ │ └── screenshots/ # Copies of screenshots for documentation
│ ├── generate_pdf.py # Script to generate PDF from markdown
│ └── Unsupervised_ML_Analysis.md # Detailed analysis report
├── LICENSE
├── main.ipynb # Jupyter notebook with the analysis
├── main.py # Python script version
├── README.md # This file
└── requirements.txt # Python dependencies
```
## Documentation
The detailed analysis report is available in `doc/Unsupervised_ML_Analysis.md`. To generate a PDF version:
```bash
cd doc
python generate_pdf.py
```
This will create `Unsupervised_ML_Analysis.pdf` in the `doc/` directory.
This project is licensed under the **MIT license**. See [LICENSE](./LICENSE) for details.
## Author
**Mosudi Isiaka O.**
 [mosudi.isiaka@gmail.com](mailto:mosudi.isiaka@gmail.com)
 [https://github.com/imosudi](https://github.com/imosudi)