K Means Algorithm
Partitioning Method-
In partitioning method the the ‘n’ is the object group and that group are combined with group notation ‘K’, where each partition represent one cluster. In partitioning method the cluster is a group of undefined or objects with similar characteristics.
There are two classified partitioning method are as follows-
1.K means
2.k mediads
K means-
k-means is one of the simplest unsupervised learning algorithm. Which follows a easy way and simplest formation for defining clustering from undefined objects. K means algorithm used for divide ‘X’ in different cluster and shows which is suitable for X” and accurate cluster to and denote accurate cluster for predict a value.
Advantages of K means algorithm-
1.It is fast and easy to understand.
2.Gives a better result when objects are different from each others.
Disadvantages for understanding k-means algorithm-
1.It is unable to handle noisy data.
2.That algorithm are fails for Non linear data set.
Explanation :
The K-Means Algorithm is one of the most popular and widely used clustering techniques in data mining and machine learning. It is a partitioning method that divides a dataset into K distinct, non-overlapping clusters based on the similarity of data points. The goal of K-Means is to minimize the distance between data points and their respective cluster centers, known as centroids.
Concept of K-Means
K-Means works by identifying groups in data such that objects within the same cluster are more similar to each other than to those in other clusters. The similarity between data points is usually measured using Euclidean distance. Each cluster is represented by a centroid — the mean of all data points belonging to that cluster.
Steps of the K-Means Algorithm
-
Select the Number of Clusters (K):Decide how many clusters you want to form in the dataset.
-
Initialize Centroids:Randomly choose K data points as the initial centroids.
-
Assign Points to Nearest Centroid:Each data point is assigned to the cluster whose centroid is closest to it, based on distance.
-
Update Centroids:After all points are assigned, recalculate the centroid of each cluster by taking the mean of its data points.
-
Repeat Until Convergence:Steps 3 and 4 are repeated until the centroids stop changing significantly or a maximum number of iterations is reached.
The objective function of K-Means is to minimize the Within-Cluster Sum of Squares (WCSS), which measures the compactness of clusters.
Advantages
-
Simple and Fast: Easy to understand and computationally efficient for large datasets.
-
Scalable: Works well with big data and continuous variables.
-
Effective: Produces good results when clusters are spherical and well-separated.
Limitations
-
Requires K to be known in advance.
-
Sensitive to initialization: Different starting points may lead to different results.
-
Affected by outliers: Extreme values can distort centroids.
-
Works best with numerical data and less effectively on categorical attributes.
Applications
K-Means is used in customer segmentation, image compression, pattern recognition, market analysis, and document clustering. It helps in discovering natural groupings within data for better decision-making and knowledge discovery.
Read More-

Comments
Post a Comment