I have class imbalance problem and want to solve this using cost sensitive learning.
- under sample and over sample
- give weights to class to use a modified loss function
Question
Scikit learn has 2 options called class weights and sample weights. Is sample weight actually doing option 2) and class weight options 1). Is option 2) the the recommended way of handling class imbalance.