O'Reilly logo

Computer Vision with Python 3 by Saurabh Kapur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

K-means clustering

K-means clustering is a type of semi-supervised or unsupervised machine learning, which works with partially labeled or even unlabeled data. As the name suggests, this is a type of clustering algorithm, which tries to form clusters of data points based on a similarity function. This algorithm is quite often confused with k-nearest neighbors. Although both algorithms share the same spirit, they are different from each other.

In k-means clustering, we form k clusters using the given data points based on a similarity metric. The most common form of a similarity metric is the distance between two points in the given space. Points closer to each other are clustered together. Initially, when the algorithm begins, we randomly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required