k-means
K-Means Clustering
· โ˜• 10 min read
In this post we will implement the K-Means Clustering algorithm in python. You will not need to know any python libraries such as numpy or pandas as this will be done in vanilla python. The key take aways here are: The algorithm by itself is naive, and not guaranteed to converge on the best fit centroid locations We need an optimizer of sorts to find an acceptable centroid fit Setup To generate your own fake data sets and try out a basic implementation of the k-means algorithm download and run the following file kmeans.