Skip to content

kleisarchaki-despoina/Clustering-Using-K-Means--Agglomerative--and-HDBSCAN

Repository files navigation

Iris Flower Clustering – Multi-Algorithmic Evaluation Pipeline

This repository features an advanced Unsupervised Machine Learning benchmarking pipeline that evaluates and compares three fundamentally different clustering paradigms: Centroid-based (K-Means), Connectivity-based (Agglomerative Hierarchical), and Density-based (HDBSCAN) clustering.

The project demonstrates how mathematical variations in algorithmic design influence cluster boundary detection, handling of geometric density, and noise isolation.

Advanced Technical Implementations

  • Multi-Paradigm Benchmarking: Implemented and optimized three distinct clustering frameworks to observe variance minimization vs. spatial density trajectory mapping.
  • Mathematical Scaling: Deployed StandardScaler pipelines to neutralize directional scale bias across botanical features (sepal and petal dimensions).
  • Noise & Outlier Engineering: Leveraged HDBSCAN's internal lambda-density hierarchies to actively isolate transitional overlapping data points as statistical noise without distorting core cluster profiles.
  • Production-Ready Architecture: Structured preprocessing workflows into reusable, modular Python functions.

Performance Summary & Paradigm Insights

  • Geometric Alignment (K-Means & Agglomerative): Both algorithms achieved strong metrics due to the roughly spherical geometry of the feature space. Ward's linkage effectively minimized within-cluster variance.
  • Density Realism (HDBSCAN): HDBSCAN refused to force overlapping structures into artificial partitions, identifying two dense natural continuums and dynamically isolating boundary anomalies.

Repository Structure

  • Clustering Using K-Means, Agglomerative, and HDBSCAN.ipynb - The primary production-grade Jupyter Notebook containing the full benchmarking analysis.

Tech Stack & Libraries

  • Language: Python
  • Data Engineering: Pandas, NumPy
  • Machine Learning & Modeling: Scikit-Learn (KMeans, AgglomerativeClustering, StandardScaler), HDBSCAN
  • Data Visualization: Seaborn, Matplotlib

License

This project is licensed under the MIT License - see the LICENSE file for details.