Hi, I currently have train data that is imbalanced.
Distribution of the train data:
Screen Shot 2021-01-16 at 21.49.061718×520 47.8 KB
I want to adjust the data so that every range has at least 50 samples.
For example, 0~0.25 has 50 samples, 0.25~0.5 has 50 samples and so on.
How can I do that?
I know PyTorch DataLoader has BatchSampler that can be used to sample an equal number of samples from each class, but the sampler uses class labels while my data is not class label.