Before training a model, I would like to split the data in a 80/20 ratio.
For example, in my dataset of 3000 rows, I have different labels. Out of which A is one label name, has 100 records in the dataset. How can I divide the dataset so that 80% of the label A data is in training and 20% is in the test set.
Do we have any pre defined functions for this?