Suppose I have a dataset with the following classes:
Class A: 3000 items
Class B: 1000 items
Class C: 2000 items
I want to split this dataset in two parts so that there are 25% data in test set. However, how can I do this so that equal percentage of each class is present in the test set? These items should be randomly selected. For e.g., the test data should be like the following:
Class A: 750 items
Class B: 250 items
Class C: 500 items