Implementation of K-Means and K-Means++ algorithm
implement Kmeans algorithm in Python with the number of clusters k ranging from 2 to 10.Initialized the cluster centers by randomly picking them among all the instances. Then for each number of clusters, upon convergence of Kmeans, computed the objective function and ploted the objective function value vs. the number of clusters k.
This initialization scheme has some problems.So implement the Kmeans++ algorithm where initialized cluster centers to be far from each other. Used the same number of clusters ranging from 2 to 10, and then computed the objective function values versus different number of clusters and plot the figure as in Kmeans.