1
$\begingroup$

I have a data set in which each row of data belongs to certain classes/labels.

text class1 class2 class3
text1 pos neg na
text2 na neg na
text3 na neu na
text4 pos neg neg
text5 neg neg na

There are basically 4 classes with 3 labels each (pos, neg, neu, na). I suppose this is both a multiclass and multilabel problem. How do I approach this? I am using the BinaryRelevance function from multisklearn but the result always returns 2 classes only (0 and 1). What is the correct way to do this?

$\endgroup$

1 Answer 1

1
$\begingroup$

From the description this is not a multilabel problem because:

  • Each of the three "classes" (columns) must have a label. In a multilabel problem every class is optional.
  • Every "class" (column) appears to have a specific purpose subdivided into 4 labels. In a regular multilabel problem the labels are exchangeable, e.g. a document can have topics "sports" and "society" but not "politics", all of these labels have no order and no specific role distinct from the others.

It seems that you simply have three regular independent multiclass problems:

  • problem 1 = predict "class 1"
  • problem 2 = predict "class 2"
  • problem 3 = predict "class 3"

Note: the word "class" for the columns is confusing because these don't correspond to the regular concept of class.

$\endgroup$
2
  • $\begingroup$ Does this mean that you suggest me to build 3 models for each class? $\endgroup$
    – catris25
    Apr 14, 2021 at 8:29
  • $\begingroup$ @catris no, just one multiclass model for each "class". model1 predicts pos, neg, neu or na for class1, model2 does the same for class2, etc. $\endgroup$
    – Erwan
    Apr 14, 2021 at 9:00

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.