Results of this run
K-Means centroids on Wine (UCI wine recognition) (178 x 13, k=3) land at silhouette 0.285, Calinski-Harabasz 70.9, Davies-Bouldin 1.389, inertia 1277.93. Agreement with held-out wine_class is adjusted Rand 0.897. 0 noise rows out of 178 sit outside a centroid. Centroid group 0 on Wine (UCI wine recognition) holds 65 rows (proline 510.2 / magnesium 92.74). Centroid group 1 on Wine (UCI wine recognition) holds 51 rows (proline 619.1 / magnesium 98.67). Centroid group 2 on Wine (UCI wine recognition) holds 62 rows (proline 1100.2 / magnesium 108.0). K-Means k sweep: k 2 scores 0.259 with 2 groups on Wine (UCI wine recognition); k 3 scores 0.285 with 3 groups on Wine (UCI wine recognition); k 4 scores 0.260 with 4 groups on Wine (UCI wine recognition); k 5 scores 0.202 with 5 groups on Wine (UCI wine recognition); k 6 scores 0.237 with 6 groups on Wine (UCI wine recognition); k 7 scores 0.204 with 7 groups on Wine (UCI wine recognition); k 8 scores 0.157 with 8 groups on Wine (UCI wine recognition). PCA keeps 55.4% for the K-Means scatter.

| k | Silhouette | Clusters |
|---|---|---|
| 2 | 0.259 | 2 |
| 3 | 0.285 | 3 |
| 4 | 0.260 | 4 |
| 5 | 0.202 | 5 |
| 6 | 0.237 | 6 |
| 7 | 0.204 | 7 |
| 8 | 0.157 | 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, wine recognition. License: CC BY 4.0. The wine_class 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.
