4

This might sound a weird question, but I could not find enough details in sklearn documentation about 'class_weight'. Can we first oversample the dataset using SMOTE and then call the classifier with the 'class_weight' option? As my testing set is highly imbalanced, I want to penalize misclassifications for minority classes. Thank you!

sophros
  • 209
  • 2
  • 11
Sarah
  • 601
  • 2
  • 5
  • 17

1 Answers1

5

I tried different classifiers using a combination of SMOTE and class_weight, the results are almost the same as using only the SMOTE approach, and this new config made almost no difference (which could be expected, following the logic behind the class_weigh approach).

PS: I have a pretty large dataset with multiple classes. This might result in different performance in different contexts.

Sarah
  • 601
  • 2
  • 5
  • 17