Calculator Inputs
Formula Used
The calculator runs clustering for every tested K value. It records within-cluster dispersion after convergence. Lower WCSS indicates tighter clusters.
K represents the number of clusters. Cⱼ contains observations assigned to cluster j. μⱼ represents that cluster’s centroid.
The elbow appears where additional clusters provide smaller improvements. Curvature and derivative methods estimate that turning point. Validation scores help confirm the choice.
How to Use
- Paste numeric rows or upload a CSV file.
- Select columns, missing-value handling, and feature scaling.
- Choose the minimum and maximum cluster counts.
- Set initialisation, distance, iterations, and validation options.
- Run the calculator and review the recommended K.
- Compare the elbow with silhouette and other metrics.
- Download the table, PDF report, or assignments.
Feature scaling is usually important for distance-based clustering. Test several settings when variables use different units. Treat the recommendation as analytical guidance.
Example Dataset
This sample contains three visually separated groups. The calculator should normally detect an elbow near K equals three. Exact values can vary slightly.
| Observation | Feature 1 | Feature 2 | Expected group |
|---|---|---|---|
| 1 | 1.0 | 1.1 | A |
| 2 | 1.3 | 0.9 | A |
| 3 | 5.0 | 5.2 | B |
| 4 | 5.4 | 4.8 | B |
| 5 | 9.0 | 1.2 | C |
| 6 | 8.7 | 0.8 | C |
Frequently Asked Questions
What does the elbow method measure?
It measures how within-cluster variation changes as K increases. The bend indicates diminishing improvement. That bend suggests a useful cluster count.
Why does WCSS always decrease?
More clusters give observations closer centroids. Therefore dispersion cannot normally increase. The goal is finding useful diminishing returns.
What if no clear elbow appears?
Some datasets lack naturally separated groups. Compare silhouette, gap, and stability scores. Consider another clustering algorithm.
Should features be standardised?
Usually yes when variables use different scales. Large-valued features can dominate distances. Standardisation gives features comparable influence.
Is the recommended K always correct?
No method guarantees the true cluster count. Domain knowledge still matters. Review cluster usefulness and interpretability.
What silhouette score is good?
Higher values generally indicate stronger separation. Values near zero suggest overlap. Negative values may indicate poor assignments.
Why use multiple initialisations?
K-means can settle into local solutions. Repeated starts improve reliability. The lowest-inertia solution is retained.
Can Manhattan distance be used?
Yes, this calculator provides that option. It uses median-based cluster centres. Results may differ from conventional K-means.
How large can the dataset be?
This page supports 5,000 rows and 20 features. Large validation runs need more processing. Reduce K ranges when necessary.