I want to randomly partition a dataset into smaller subsets using a mean based splitting approach with python. Predictions would be performed on each of this subsets