Please visit, subscribe and share 10 Minutes Lectures in Computer Science

# Multiple choices questions in Machine learning. Interview questions on machine learning, quiz questions for data scientist answers explained, How to find optimal k value in k-means? Elbow method vs silhouette method, Which is the best method to find optimal number of clusters in k-means?

## Machine Learning MCQ - Which is the method to find optimal number of clusters (k value) in k-means algorithm?

 Next >

1. K-means is an unsupervised learning algorithm. In K-means, k refers to the number of clusters. We have several methods to find the optimal number of clusters in K-means algorithm. Which of the following methods can give optimal (best) number of clusters?

a) Manhattan method

b) Elbow method

c) Euclidean method

d) Silhouette method

### The silhouette method for finding optimal k value in k-means

The silhouette Method is a method to find the optimal number of clusters and interpretation and validation of consistency within clusters of data. The silhouette method computes silhouette coefficients of each point that measure how much a point is similar to its own cluster compared to other clusters by providing a succinct graphical representation of how well each object has been classified.

Compute silhouette coefficients for each of point, and average it out for all the samples to get the silhouette score. [For more please refer here]

### Why elbow method is not chosen as the better method over silhouette method in finding the best value for k in k-means?

Usually elbow curve method is a little ambiguous as the bend point for some datasets is not visible clearly.

### Difference between Elbow and Silhouette methods

 Metrics Elbow method Silhouette method Calculation Calculates the Euclidean distance Considers variables such as variance, skewness, etc. Dataset size Works well for smaller datasets It is a better option for higher-dimensional data Effect of duplicate data May not give proper output in case of duplicate data available Works better and identifies duplicate data Efficacy Efficiency depends on the nature of the dataset Does not depend on the nature of the dataset Finding k The elbow method is used to find the “elbow” point, where adding additional data samples does not change cluster membership much. [Refer here for more] Silhouette score determines whether there are large gaps between each sample and all other samples within the same cluster or across different clusters.

************************