Implement getBestSegmentation