In imbalanced data, samples in each class will have a huge difference between them. For example, one class may have 1000 samples. On the other hand, another class may only have 200–300 samples. In such scenarios, before doing anything, we first need to handle the imbalance of the data. There are many techniques we can follow.
- Collect more data.
- Apply oversampling when we have a large amount of data
- Apply undersampling
- Try some other algorithm