Added feature to balance the classes when splitting the dataset

The idea is that train, validation and test should have the same proportion of each class