1
$\begingroup$

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
$\endgroup$
  • $\begingroup$ What does it mean for a feature vector to have -1 labels? $\endgroup$ – goangit Dec 10 '14 at 9:43
  • $\begingroup$ @goangit sorry, I meant 1 label. $\endgroup$ – Salvador Dali Dec 10 '14 at 19:00
  • $\begingroup$ How is the distribution of your labels. Any classes with few positives? $\endgroup$ – Kasper Christensen Dec 17 '14 at 22:18
0
$\begingroup$

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.

$\endgroup$

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.