Define class weights to make predictions on a class imbalanced dataset

Tracyrenee
6 min readJun 11, 2023

Making predictions on an imbalance dataset is perhaps a very difficult feat for the data scientist. There are several methods that can be used to balance classes, to include oversampling and undersampling techniques. I prefer to define class weights in my program, however, because these values can be incorporated within the model, to include both sklearn and tensorflow.

--

--

Tracyrenee

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