Simplifying indices of the training set