Results of this run
BIRCH CF-tree on Customer Segments (threshold 0.5, then k=4, threshold=0.5) scores silhouette 0.343, CF-tree Calinski-Harabasz 352.7, CF-tree Davies-Bouldin 1.293. Held-out segment versus the leaf clustering: adjusted Rand 0.739. 0 noise rows out of 200 in the tree. CF leaf 0 on Customer Segments holds 63 rows (annual_income 31926.3 / avg_spend 785.7). CF leaf 1 on Customer Segments holds 50 rows (annual_income 78401.2 / avg_spend 2953.6). CF leaf 2 on Customer Segments holds 51 rows (annual_income 55817.3 / avg_spend 1627.4). CF leaf 3 on Customer Segments holds 36 rows (annual_income 46859.6 / avg_spend 447.8). BIRCH k path: k 2 splits to 0.608 with 2 groups on Customer Segments; k 3 splits to 0.483 with 3 groups on Customer Segments; k 4 splits to 0.343 with 4 groups on Customer Segments; k 5 splits to 0.334 with 5 groups on Customer Segments; k 6 splits to 0.237 with 6 groups on Customer Segments; k 7 splits to 0.180 with 7 groups on Customer Segments; k 8 splits to 0.168 with 8 groups on Customer Segments. CF-tree scatter keeps 90.5%.

| k | Silhouette | Clusters |
|---|---|---|
| 2 | 0.608 | 2 |
| 3 | 0.483 | 3 |
| 4 | 0.343 | 4 |
| 5 | 0.334 | 5 |
| 6 | 0.237 | 6 |
| 7 | 0.180 | 7 |
| 8 | 0.168 | 8 |
from sklearn.cluster import Birch
from sklearn.preprocessing import StandardScaler
Xs = StandardScaler().fit_transform(X)
labels = Birch(n_clusters=4, threshold=0.5).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: Synthetic customer records bundled with this site. License: Generated for demos; no external license. The segment 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.
