Learn Before
Picking optimal k value
There are two main waits to pick the optimal k value for k-means clustering:
-
Elbow method: Plot the explained variation as a function of the number of clusters and pick the elbow of the curve as the number of clusters to use.
-
Silhouette score: Calculated using the silhouette coefficient - (x-y)/max(x,y) where x is mean distance to the instances of the next closest cluster and y is the mean distances to the other instances in the same cluster. You pick the k value with the biggest silhouette score.
0
1
Tags
Data Science
Related
How might K-means be used in conjunction with supervised methods to predict on an unlabeled data set?
Medium: Difference between K-Means and KNN
Math/Python Explanation: Difference Between K-Means and KNN
Algorithm of K-means Clustering
Image of K-Means Clustering Process
Limitations of K-means clustering
Advantages of K-means clustering
Picking optimal k value
The Elbow Method for Selecting Optimal K
Hands-On Machine Learning with R: Chapter 20 K-means Clustering