Results of this run
K-Means centroids on Iris Flowers (150 x 4, k=3) land at silhouette 0.460, Calinski-Harabasz 241.9, Davies-Bouldin 0.834, inertia 139.82. Agreement with held-out species is adjusted Rand 0.620. 0 noise rows out of 150 sit outside a centroid. Centroid group 0 on Iris Flowers holds 53 rows (petal length (cm) 4.37 / sepal length (cm) 5.80). Centroid group 1 on Iris Flowers holds 50 rows (petal length (cm) 1.46 / sepal length (cm) 5.01). Centroid group 2 on Iris Flowers holds 47 rows (petal length (cm) 5.51 / sepal length (cm) 6.78). K-Means k sweep: k 2 scores 0.582 with 2 groups on Iris Flowers; k 3 scores 0.460 with 3 groups on Iris Flowers; k 4 scores 0.387 with 4 groups on Iris Flowers; k 5 scores 0.346 with 5 groups on Iris Flowers; k 6 scores 0.317 with 6 groups on Iris Flowers; k 7 scores 0.320 with 7 groups on Iris Flowers; k 8 scores 0.339 with 8 groups on Iris Flowers. PCA keeps 95.8% for the K-Means scatter.

| k | Silhouette | Clusters |
|---|---|---|
| 2 | 0.582 | 2 |
| 3 | 0.460 | 3 |
| 4 | 0.387 | 4 |
| 5 | 0.346 | 5 |
| 6 | 0.317 | 6 |
| 7 | 0.320 | 7 |
| 8 | 0.339 | 8 |
from sklearn.cluster import KMeans
from sklearn.preprocessing import StandardScaler
Xs = StandardScaler().fit_transform(X)
labels = KMeans(n_clusters=3, n_init=10, random_state=42).fit_predict(Xs)
Who, how, and why
Method: StandardScaler, drop constant columns. Code version 3e4afc4b4352 (scripts/seo/build_explore_artifacts.py). scikit-learn 1.4.2. Seed 42. Dataset source: UCI Machine Learning Repository, Iris (Fisher, 1936). License: CC BY 4.0. The species column was held out of the fit and used only for the adjusted Rand score.
Results computed on 2026-11-02.
The results paragraph is filled from these numbers by a fixed template in the site code, so the scores can be checked against the same dataset in the tool.
Maintainer: nikolaou1982.
Contact: nick1982100@gmail.com.
