Function of K-means was made. Only one method was left.