Fix for segmentation examples k-means after refactoring