KMeansMachine: fix for #123 + add is_similar_to