How I used class_weights = ‘balanced’ to solve a class imbalance problem in Python
5 min readJan 25, 2023
I have been working on Kaggle’s playground competitions and, since it is Tuesday, I eagerly began work on January 2023’s fourth competition of the month. This month’s competition focused on credit card fraud and, as a consequence, had a very large class imbalance.