1
$\begingroup$

I have a data set with 7 labels. I would like to apply multi-label classification on that. by that, each instance may have more than one label associated.

now let's explain what I want.

Rules in my dataset for the labels:

  1. each instance may have one or more than one labels BUT when the instance label is others it will not have any other label. For example:

    NEVER, NEVER take this drug. => others

here the label is others so my model should not predict any other label with that.

But I printed the result of the test set and I saw most of the time this label has been repeated in other labels. For example, the result of the test set for this instance is that:

NEVER, NEVER take this drug. => others, ADR

but as the true label is others it should never be predicted by another label

Is there any approach I can do that it prevents my classifier to predict this label with other labels?

$\endgroup$
2
$\begingroup$

The idea of multi-label classification is that predicted properties are not mutually exclusive, which is not true in your case. You could take the label others away from the multi-label classifier and build a binary classifier for it. Run the multi-label classifier only if the binary classifier predicts the label of an instance is not others.


Edit: Add the following block diagram to elaborate on the multi-stage prediction approach.

multi-stage prediction

$\endgroup$
  • 1
    $\begingroup$ +1 Multi-stage prediction is often useful -- regardless of the toolkit you use. $\endgroup$ – Wayne Aug 12 '18 at 13:16
  • $\begingroup$ @tuomastic thank you so much for the answer. so you mean firstly I should apply the same classifier but in the binary version. and then apply multi-label classifier? in this case how can get a total average f1 measurement? or you mean this is needed to be done in two different steps so no way to get an estimation of the whole dataset? $\endgroup$ – sariii Aug 12 '18 at 16:06
  • $\begingroup$ can you please elaborate more about your approach? $\endgroup$ – sariii Aug 12 '18 at 16:29
  • $\begingroup$ @sariaGoudarzi I have edited the answer by adding a block diagram of the multi-stage prediction. The binary classifier predicts if others is 0 or 1. If others is 1, the other labels are 0. If others is 0, the other labels are predicted by the multi-label classifier. $\endgroup$ – tuomastik Aug 13 '18 at 10:44
  • 1
    $\begingroup$ @sariaGoudarzi Well, you didn't seem happy with your original approach either so I guess it's a trade-off. In the multi-stage approach, you at least get predictions in a correct format. $\endgroup$ – tuomastik Aug 14 '18 at 4:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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