I try to find an answer about whether or not it is possible to assign a cost matrix while training a neural network with MLPClassifier, but I did not. I have an imbalanced dataset; 90% of my data are class A and 10% are class B. Moreover, I am more interested in identifying instances of class B. So, I would like to penalize for missing a class B, otherwise, the model will learn to always predict Class A and get an accuracy of 90%. Is my only solution is to oversample/undersample the training set?
Asked
Active
Viewed 69 times