Calculated results
Interactive centroid plot
Warnings and data notes
Formula used
Weighted centroid: Ck = Σ(wixi) / Σwi
Inertia: Σ ||xi − Ccluster(i)||²
A centroid represents the coordinate center of a cluster. The arithmetic centroid averages every selected feature. Weighted calculations give influential observations more importance.
Nearest-centroid assignment compares each observation with every center. Iterative updates repeat assignment and recalculation until movement becomes small. The final arrangement describes compact cluster structure.
How to use
- Paste data or upload a supported text file.
- Preview the data and confirm column mappings.
- Select preprocessing, distance, and centroid options.
- Choose plot labels, paths, boundaries, and diagnostics.
- Calculate the result and inspect every output table.
- Export the graph, assignments, summary, or report.
Example data
| Label | X | Y | Cluster | Weight |
|---|---|---|---|---|
| P1 | 1.2 | 2.4 | A | 1 |
| P2 | 1.8 | 2.9 | A | 1 |
| P4 | 6.1 | 7.0 | B | 1 |
| P7 | 10.5 | 2.2 | C | 1 |
Centroid plot interpretation
Points near their centroid form compact, consistent clusters. Long connector lines reveal weak assignments or possible outliers. Widely separated centroids usually indicate stronger cluster distinction.
Inertia becomes smaller when observations remain near assigned centers. Silhouette values near one indicate useful separation. Negative values can expose questionable cluster membership.
Frequently asked questions
What is a centroid?
A centroid is the coordinate average representing a cluster center. It may use ordinary, weighted, or median calculations. Its position summarizes the included observations.
How is a centroid different from a medoid?
A centroid can be an artificial coordinate between observations. A medoid must be an actual dataset observation. Medoids can resist unusual values better.
Which distance metric should I choose?
Euclidean distance works well for many continuous features. Manhattan distance can reduce diagonal sensitivity. Cosine distance emphasizes vector direction instead.
Why should features be scaled?
Large numerical ranges can dominate distance calculations. Scaling gives selected features more comparable influence. Choose a method matching your interpretation.
What does inertia measure?
Inertia totals squared distances from points to centroids. Lower values indicate tighter assigned clusters. Comparisons require the same dataset and scaling.
What is a good silhouette score?
Higher positive values indicate better separation and compactness. Values near zero show overlapping cluster boundaries. Negative values suggest possible incorrect assignments.
Can I calculate one dataset centroid?
Set the cluster count to one for unlabeled data. Every valid observation receives one shared center. The output describes the complete dataset location.
How are empty clusters handled?
An empty iterative cluster receives a replacement observation. The calculator records a warning for review. Manual fixed centroids remain available without members.
Can I export the results?
Yes, summaries and assignments download as CSV files. Charts download as PNG or SVG images. A printable PDF report is also available.