How I used class_weights = ‘balanced’ to solve a class imbalance problem in Python

Tracyrenee
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.

--

--

Tracyrenee

I have close to five decades experience in the world of work, being in fast food, the military, business, non-profits, and the healthcare sector.