Hierarchical clustering
- Cut
- A fixed number of clusters.
- Linkage
- Ward.
- Noise
- No noise rows on these fits.
Loading…
Ward linkage merges rows until the cut leaves a fixed number of clusters. DBSCAN keeps dense regions and can leave a row as noise. Its silhouette is not defined when that fit does not keep two groups.
Choose whether the cut leaves a fixed number of clusters or dense regions.
This is a choice, not a measured winner.
DBSCAN Clustering has the higher silhouette on Iris Flowers and Customer Segments; DBSCAN Clustering has no silhouette on Wine (UCI wine recognition), because that fit did not keep two groups; Noise rows show up on Iris Flowers and Wine (UCI wine recognition).
Do you need the cut to leave a fixed number of clusters?
Ward linkage, instead of dense regions that can leave a row as noise.
Ward linkage on Iris Flowers (150 rows and 4 features) stops at 3 clusters, silhouette 0.447, adjusted Rand 0.615, noise rows 0. DBSCAN keeps 2 dense regions and 4 noise rows, silhouette 0.598, adjusted Rand 0.552. The density fit separates these rows more cleanly than the Ward cut.


The link loads the sample. Run is still required.
Ward linkage on Wine (UCI wine recognition) (178 rows and 13 features) stops at 3 clusters, silhouette 0.277, adjusted Rand 0.790, noise rows 0. DBSCAN keeps 1 dense region and 8 noise rows, silhouette not defined, adjusted Rand not defined. DBSCAN silhouette is not defined, because that density fit did not leave two or more dense regions.


The link loads the sample. Run is still required.
Ward linkage on Customer Segments (200 rows and 5 features) stops at 4 clusters, silhouette 0.357, adjusted Rand 0.708, noise rows 0. DBSCAN keeps 2 dense regions and 0 noise rows, silhouette 0.608, adjusted Rand 0.330. The density fit separates these rows more cleanly than the Ward cut.


The link loads the sample. Run is still required.
| Dataset | Algorithm | Clusters | Noise | Silhouette | Adjusted Rand |
|---|---|---|---|---|---|
| Iris Flowers | Agglomerative Hierarchical Clustering | 3 | 0 | 0.447 | 0.615 |
| Iris Flowers | DBSCAN Clustering | 2 | 4 | 0.598 | 0.552 |
| Wine (UCI wine recognition) | Agglomerative Hierarchical Clustering | 3 | 0 | 0.277 | 0.790 |
| Wine (UCI wine recognition) | DBSCAN Clustering | 1 | 8 | not defined | not defined |
| Customer Segments | Agglomerative Hierarchical Clustering | 4 | 0 | 0.357 | 0.708 |
| Customer Segments | DBSCAN Clustering | 2 | 0 | 0.608 | 0.330 |
Ward linkage merges rows until the cut leaves a fixed number of clusters. DBSCAN keeps dense regions and can leave a row as noise. Its silhouette is not defined when that fit does not keep two groups.
Method: StandardScaler, drop constant columns. Code version 3e4afc4b4352 (scripts/seo/build_explore_artifacts.py). scikit-learn 1.4.2. Seed 42. Both algorithms were fit on the same scaled table. Where a label column exists, it was held out of the fit and scored with adjusted Rand. Iris Flowers: UCI Machine Learning Repository, Iris (Fisher, 1936). License: CC BY 4.0. Wine (UCI wine recognition): UCI Machine Learning Repository, wine recognition. License: CC BY 4.0. Customer Segments: Synthetic customer records bundled with this site. License: Generated for demos; no external license.
Results computed, published, and last updated on 2026-11-02.
The comparison sentences are filled from these published runs by a fixed template, so the scores can be checked against the same datasets in the tool.
Maintainer: nikolaou1982.
Contact: nick1982100@gmail.com.