# Multiple labels in supervised learning algorithm

I have a corpus of text with a corresponding topics. For example "A rapper Tupac was shot in LA" and it was labelled as ["celebrity", "murder"]. So basically each vector of features can have many labels (not the same amount. The first feature vector can have 3 labels, second 1, third 5).

If I would have just one label corresponded to each text, I would try a Naive Bayes classifier, but I do not really know how should I proceed if I can have many labels.

Is there any way to transform Naive Bayes into multi label classification problem (if there is a better approach - please let me know)?

P.S. few things about the data I have.

• approximately 10.000 elements in the dataset
• text is approximately 2-3 sentences
• maximum 7 labels per text
• What does it mean for a feature vector to have -1 labels? Dec 10 '14 at 9:43
• @goangit sorry, I meant 1 label. Dec 10 '14 at 19:00
• How is the distribution of your labels. Any classes with few positives? Dec 17 '14 at 22:18

I would create a procedure which does the following:

For each unique label:
Define positives as texts containing labels
Define negatives as text not containing the label
Balance negatives and positives by oversampling the minority class
Train SVM or Naive Bayes model on trainingset
End:


You probably also want a test set which you need to extract before running this procedure.

There is a lot of literature on multiclass problems, but I dont think your problem is a traditional multiclass problem.