The dataset has 5 labels A,B,C,D,E
A,B,C are majority and D&E are minority.The penalty to misclassify D&E are huge. How can I implement a cost sensitive learning. The input to the model will be english sentences like user comments.
Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.Sign up to join this community
Option 1: play with the thresholds for classifying something – perhaps you could set a threshold for classifying something as a minority class should even if it doesn't have the highest probability/score, or a ratio of probabilities/thresholds.
Option 2: upsample your data (take resamples with replacement of the minority classes until they have as many observations as the others).
Option 3: use some cost-sensitive algorithm (e.g. some forms of classification trees) - probably won't translate into very accurate results.