Why we need to deal with imbalanced classes
Class imbalance naturally occurs in certain types of classification problems such as credit attribution (data set usually contains much more approved credits than rejected) or fraud detection (fraud usually represents a small percentage of the overall transactions).
Class imbalance means that one of the modalities of a categorical variable is over-represented with respect to the others, such as in the example below:
It is recommended to handle the class imbalance before training a model and the suggested methods usually fall in…