main idea of undersampling is randomly delete the class which has sufficient observations so that the comparative ratio of two classes is significant in our data. So, how to undersampling with image data in python? please help me:(
I took the fundus image data from Kaggle. there are 35127 images with 5 classes. class 0: 25810 data, class 1: 2443 data, class 2: 5292 data, class 3: 873 data, class 4: 708 data,
I want each class to have as much as 708 images following the 4th class. How do I delete the rest of the images in Python?