I'm trying to figure out what exactly
class_weight from sklearn does.
When working with imbalanced datasets, I'm always using
class_weight because the results are usually better than using SMOTE. However, I'm not sure why.
I've tried to find an answer, but most of answers regarding the subject are vague. For instance, the first answer here explain
class_weight in a way that looks similar to SMOTE. This and this also didn't provide an answer.
I read once that SMOTE is used as an oversampling method that relies on KNN and that
class_weight acts on the cost function. But I didn't find this anymore and I'm not sure it's true, since I haven't read anywhere else.