how to limit one label while doing multi-label classification

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?

1 Answer

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.

• +1 Multi-stage prediction is often useful -- regardless of the toolkit you use. Aug 12, 2018 at 13:16
• @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? Aug 12, 2018 at 16:06
• can you please elaborate more about your approach? Aug 12, 2018 at 16:29
• @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. Aug 13, 2018 at 10:44
• @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. Aug 14, 2018 at 4:55