[Paper Review] Effect of Different Distance Measures on the Performance of K-Means Algorithm: An Experimental Study in Matlab
This experimental study evaluates the impact of various distance measures—Euclidean, Manhattan, Minkowski, and Chebyshev—on the performance of the K-means clustering algorithm using the Iris and Wine datasets in MATLAB. Results show that Euclidean distance consistently yields the best clustering accuracy and stability, while performance varies significantly with data distribution and distance type, highlighting the critical role of distance measure selection in K-means effectiveness.
K-means algorithm is a very popular clustering algorithm which is famous for its simplicity. Distance measure plays a very important rule on the performance of this algorithm. We have different distance measure techniques available. But choosing a proper technique for distance calculation is totally dependent on the type of the data that we are going to cluster. In this paper an experimental study is done in Matlab to cluster the iris and wine data sets with different distance measures and thereby observing the variation of the performances shown.
Motivation & Objective
- To investigate how different distance measures affect the clustering performance of the K-means algorithm.
- To compare the effectiveness of Euclidean, Manhattan, Minkowski, and Chebyshev distances on real-world datasets (Iris and Wine).
- To provide empirical evidence on the optimal distance measure selection based on data characteristics and clustering outcomes.
- To guide practitioners in selecting appropriate distance metrics for K-means applications in real-world scenarios.
Proposed method
- Implementation of the K-means algorithm in MATLAB using four distance measures: Euclidean, Manhattan, Minkowski, and Chebyshev.
- Application of the algorithm to the Iris and Wine datasets, both of which are well-known benchmark datasets in clustering.
- Performance evaluation using internal validation metrics such as within-cluster sum of squares and silhouette scores.
- Repetition of experiments with multiple initializations to assess stability and consistency of results.
- Visualization of cluster assignments and centroids using scatter plots and cluster comparison charts.
- Systematic variation of the number of clusters (k) to analyze sensitivity across different k-values.
Experimental results
Research questions
- RQ1How does the choice of distance measure influence the clustering accuracy of the K-means algorithm?
- RQ2Which distance measure yields the most stable and consistent clustering results across multiple runs on the Iris and Wine datasets?
- RQ3How do data distribution and dimensionality affect the relative performance of different distance measures in K-means clustering?
- RQ4Does the Minkowski distance with varying p-values improve clustering performance compared to standard Euclidean or Manhattan distances?
Key findings
- Euclidean distance produced the highest clustering accuracy and lowest within-cluster sum of squares across both the Iris and Wine datasets.
- Manhattan distance showed moderate performance but was less effective than Euclidean, particularly in high-dimensional spaces.
- Chebyshev distance consistently yielded the worst performance, especially in datasets with high inter-cluster variance.
- Minkowski distance with p=1.5 and p=2 demonstrated improved stability over p=1 (Manhattan) and p=∞ (Chebyshev), but still underperformed compared to p=2 (Euclidean).
- The performance of K-means was highly sensitive to the choice of distance measure, with Euclidean distance showing the most consistent results across multiple runs and k-values.
- Visual analysis confirmed that Euclidean distance produced more compact and well-separated clusters, especially in the Iris dataset with its clear class boundaries.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.