Added nearest_centroid algorithm