- First we initialize k points, called means, randomly.
- We categorize each item to its closest mean and we update the mean’s coordinates, which are the averages of the items categorized in that mean so far.
- We repeat the process for a given number of iterations and at the end, we have our clusters.
- k_means_clustring.ipynb : k means clustering from scratch using numpy.
- color_quantization_kmeans.ipynb : Reducing number of colors in an image by making clusters of similar colors and replacing all the similar colors with the cluster center color.
kunwarsaaim / k_means_clustering Goto Github PK
View Code? Open in Web Editor NEWUnsupervised Machine learning Algorithm : K Means Clustering