Scalable kmeans clustering algorithm in js using objects as input vectors, tailor made for sparse matrix