In this assignment you will implement the KMeans algorithm, you can use R, Java or Python to write your source code. Run your source code on the twoElipsesdata.txt. For initialization, use any random function to set the initial clusters’ centers, k points. For stopping criteria use the following two criteria:
1) The squared Euclidean distances between the old mean and the current mean € is less than a threshold, say 0.001.
2) The number of iterations is less than 20.