K- Means Clustering
Anuj Ramola
DevSecOps Kubernetes | Docker | Terraform | Ansible | Prometheus | Graffana | CI/CD
The k-means algorithm is a?clustering algorithm. That means that you have a bunch of points in some space, and you want to guess what groups they seem to be in. For example, say we have these points:
o ?
o oo ?
o o ?
?
oo ?
oo o?
As a human, you can easily look at those and say that the ones in the top left are a cluster and the ones in the bottom right are a cluster, but if there were lots more clusters, or if they overlapped, or if they were in a 3-dimensional or much higher dimensional space, it would be harder.
With the k-means algorithm, you have to tell it how many clusters to look for (that's the "k"), and you tell it some real data points (like those o's in the diagram above), and then it tries to guess a reasonable grouping of the points into k clusters.
Here's basically?how it works:
领英推荐
Depending on what points you started with, you might end up with a different guess for the clusters than if you had had different starting points. But you will always converge to something - there will never be a case where the cluster centers keep moving and never stop.
One limitation of the k-means algorithm is that it doesn't work well if the real clusters are very different sizes (some small ones and some big ones), or if they aren't very circular (for example if they're long and skinny).
Applications of k-means clustering:
Conclusion: Clustering Algorithms like K-Means are popular in almost every domain. It has got quite a lot of applications like Market Segmentation, Image Segmentation, Identifying Crime Localities, Recommendation Engines etc.
Thank Ypu
Hope this helps! :)