K-means algorithm implementation by pandoricweb