Vector Quantization using K-Means Algorithm

Using the K-Means Algorithm for Vector Quantization of a Raccoon Grayscale Image

Mahnoor Javed
Analytics Vidhya

--

Photo by Gary Bendig on Unsplash

Vector Quantization

Vector Quantization is a lossy data compression technique. It allows the modeling of the probability density function by the distribution of the prototype vectors. There is some modification of data that renders the compression lossy.

Vector Quantization works by dividing a large set of points (vectors) into groups having approximately the same number of points closest to them. Each group is represented by its centroid point, as in k-means and some other clustering algorithms.

(Definition from Wikipedia)

K-Means Algorithm

K-Means is a clustering algorithm, which clusters together data points based on the number of clusters you want to identify in your data. In K-Means Clustering Algorithms, K is the no of clusters! K-Means randomly selects the initial clusters and then based on the distance, assigns the data points to the nearest clusters.

StatQuest’s video on Youtube gives a good grasp on how the algorithm actually works, so if you’re new to machine learning algorithms, you may want to check out the following video:

--

--