Sampling techniques for deep learning models
In this section, we’ll explore some sampling methods, such as random oversampling and weighted sampling, for deep learning models. We’ll then transition into data augmentation techniques, which bolster model robustness and mitigate dataset limitations. While large datasets are ideal for deep learning, real-world constraints often make them hard to obtain. We will also look at some advanced augmentations, such as CutMix and MixUp. We’ll start with standard methods before discussing these advanced techniques.
Random oversampling
Here, we will apply the plain old random oversampling we learned in Chapter 2, Oversampling Methods, but using image data as input to a neural network. The basic idea is to duplicate samples from the minority classes randomly until we end up with an equal number of samples from each class. This technique often performs better than no sampling.
Tip
Make sure to train the model for enough...