Random Forest – optimize for AUC or F1 score
I am using random forest in sklearn
, and my dataset is fairly unbalanced (20% positive class, 80% other class). Is there a way to make it train (optimize) for some metric that takes this into consideration, like AUC score or F1-score? Are there any tricks that I can use to nudge it in this direction?
So far, only approach I have thought of / tried is using different class weights.