Clustering Result
Elbow Curve
Selected Cluster Preview
Cluster Size Distribution
Detailed Elbow Results
Centroids and Cluster Statistics
Analysis Notes
Formula Used
For Euclidean K-Means, the within-cluster sum of squares is:
WCSS = Σ(j=1 to k) Σ(xᵢ ∈ Cⱼ) ||xᵢ − μⱼ||²
The percentage improvement between consecutive cluster counts is:
Improvement(k) = [(WCSS(k−1) − WCSS(k)) / WCSS(k−1)] × 100
For Manhattan distance, this calculator minimizes total absolute distance and reports that objective clearly.
How to Use
- Paste numeric data or load a CSV file.
- Inspect columns and select the features used for clustering.
- Choose preprocessing, cluster range, algorithm, and elbow method.
- Run the calculator and inspect the recommended cluster count.
- Compare validation metrics, cluster sizes, centroids, and exported results.
Example Data
| Annual Spend | Visits | Support Calls |
|---|---|---|
| 1200 | 8 | 1 |
| 1450 | 10 | 2 |
| 5200 | 24 | 3 |
| 5600 | 27 | 4 |
| 9800 | 41 | 8 |
Frequently Asked Questions
What does the elbow point represent?
It marks where adding clusters produces smaller improvements. This often suggests a practical cluster count.
Why does the objective always decrease?
More clusters let centroids fit observations more closely. The decrease alone does not prove better generalization.
Should features be scaled?
Usually yes when units differ substantially. Scaling prevents large-magnitude features dominating distance calculations.
What if no clear elbow appears?
Use silhouette, Calinski-Harabasz, Davies-Bouldin, stability, and domain knowledge. Some datasets have gradual structure.
Can k equal the number of rows?
Technically yes, but every row becomes isolated. This calculator prevents unhelpful or invalid ranges.
What is K-Means++?
It spreads initial centroids more intelligently. This usually improves convergence and reduces poor local solutions.
How does Manhattan distance change results?
It uses absolute coordinate differences instead of squared Euclidean distances. Median-like centroids become appropriate.
What does silhouette score measure?
It compares cohesion within clusters against separation from neighboring clusters. Higher values are generally better.
Why compare several random seeds?
K-Means can converge to different local solutions. Multiple seeds reveal whether the elbow remains stable.