1
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ Can you put up a ratio or percentages of the class representation in your data? $\endgroup$ Commented Jul 3, 2017 at 7:38
  • 1
    $\begingroup$ Just multiply the loss for samples from D,E by their relative importance to A,B,C. $\endgroup$
    – Emre
    Commented Jul 3, 2017 at 8:34
  • $\begingroup$ A: 57% B: 17% C:18% D:5% E: 3% $\endgroup$
    – khangaroth
    Commented Jul 3, 2017 at 9:21

1 Answer 1

2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.