Results of this run
PAM medoids on Iris Flowers pick 3 real Iris Flowers rows as centers (k=3). Medoid silhouette is 0.451, medoid Calinski-Harabasz is 238.5, medoid Davies-Bouldin is 0.832, medoid inertia is 130.73. Held-out species matches the medoids at adjusted Rand 0.676. 0 noise rows out of 150 were still assigned. Medoid group 0 on Iris Flowers holds 56 rows (petal length (cm) 5.41 / petal width (cm) 1.94). Medoid group 1 on Iris Flowers holds 44 rows (petal length (cm) 4.26 / petal width (cm) 1.34). Medoid group 2 on Iris Flowers holds 50 rows (petal length (cm) 1.46 / petal width (cm) 0.25). Medoid sweep: k 2 reaches 0.582 with 2 groups on Iris Flowers; k 3 reaches 0.451 with 3 groups on Iris Flowers; k 4 reaches 0.379 with 4 groups on Iris Flowers; k 5 reaches 0.347 with 5 groups on Iris Flowers; k 6 reaches 0.284 with 6 groups on Iris Flowers; k 7 reaches 0.285 with 7 groups on Iris Flowers; k 8 reaches 0.311 with 8 groups on Iris Flowers. The medoid scatter is PCA at 95.8% variance.

| k | Silhouette | Clusters |
|---|---|---|
| 2 | 0.582 | 2 |
| 3 | 0.451 | 3 |
| 4 | 0.379 | 4 |
| 5 | 0.347 | 5 |
| 6 | 0.284 | 6 |
| 7 | 0.285 | 7 |
| 8 | 0.311 | 8 |
from sklearn.preprocessing import StandardScaler
Xs = StandardScaler().fit_transform(X)
# PAM with k-medoids++ init, euclidean distance, random_state=42, n_clusters=3.
# The sandbox K-Medoids control uses the same seed and scaling.
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.
