Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Python sklearn - handle unbalanced dataset when fitting a model with cross_val_score

sklearn fit() has the 'class_weight' parameter. In a model selection process, I use the cross_val_score() function, but I see that there is no option to subject the objective function to give a different weight to each class.

Note: I prefer not to perform over/under sampling.

Is there any other solution/workaround to handle unbalanced dataset with a cross validation object in sklearn?

Comments