K-Means Clustering Algorithm.
K-Means Clustering is an unsupervised learning algorithm that solves clustering problems in machine learning or data science. In this topic, we will learn what is K-means clustering algorithm.
Before we dive into algorithms, let's first understand clustering,
Clustering:
K-Mean Algorithm:
Aim of the K-Mean Algorithm:
The k-means clustering algorithm mainly performs two tasks:
How K-Mean Algorithm Works:
Until you get a clearer cluster means no overlapping.
We will understand each figure one by one.
Main points:
Measuring Distance:
Euclidean Distance Measure:
The most common case is determining the distance between two points. If we have point P and point Q, the Euclidean distance is an ordinary straight line. It is the distance between the two points in Euclidean space.
The formula for the distance between two points is shown below:
Manhattan Distance Measure:
The Manhattan distance is the simple sum of the horizontal and vertical components or the distance between two points measured along axes at right angles.
Recommended by LinkedIn
The formula is shown below:
How to evaluate K-Mean Model?
Silhouette Coefficient:
Silhouette Coefficient or silhouette score is a metric used to calculate the goodness of a clustering technique. Its value ranges from -1 to 1.
1: Means clusters are well apart from each other and clearly distinguished.
0: Means clusters are indifferent, or we can say that the distance between clusters is not significant.
-1: Means clusters are assigned in the wrong way.
Important Points:
How to select the optimal value for k?
The Elbow method is one of the most popular ways to find the optimal number of clusters. This method uses the concept of WCSS value. WCSS stands for Within Cluster Sum of Squares, which defines the total variations within a cluster.
How does it work?
k=[2,3,4,5,6,...10]
K-mean Algorithm Overview:
Application OF K-Mean Algorithm:
The k-means algorithm is a popular clustering algorithm used in various fields to group data points into distinct clusters. Here are some common applications of the k-means algorithm:
—------------------------------------------------------------------------------------------------------
If you learned something from this blog, make sure you give it a 👏🏼
Will meet you in some other Aricle, till then Peace ✌🏼.
Happy reading.
Thank_You..
Principal Instructor-Data Science, Learning Operations at AlmaBetter
1yInteresting!