3
$\begingroup$

Currently, I am working on projects in which I have to classify the restaurant review data. I am using multinomial Naive Bayes algorithm. I am bit confused that my problem is related to multiclass or multilabel.

review example-

Please treat your customer like customer, not dogs. .I will never go or advice anyone to go at Naivedyam, Hauz Khas.They guys are sick and complete businessman. Food was ver bad in taste, but place and staff were too dirty It contains three different classes like

Bad Experience Staff Behavior food quality How to create the training data set?

If problem is related to multilabel then how I can create the training data set. example

ID Content                    Tags
1, "content of the review#1", Bad Experience,Staff Behavior,food quality

or

    ID    Content                    Tags
   1, "content of the review#1", Bad Experience
   2, "content of the review#1", Staff Behavior
   3, "content of the review#1", food quality

Any suggestion

$\endgroup$

2 Answers 2

1
$\begingroup$

Although I doubt that classification is the way to tackle this problem, I would recommend you to encode your variables as follows:

   ID    Content                    Bad Experience Staff Behavior Food Quality
   1,    "content of the review#1", 1,             1,             1

For each tag you write a 1 if it is active for a review and 0, if not. Using such encoding would make your problem a multilabel problem with only binary classes for each label.

$\endgroup$
1
$\begingroup$

What's all of the available Tags? It seems the tags are describing the experience from different perspective. If that is the case, I would suggest you to build multiple models to classify different on different perspective. Say

  • Classifier 1: classification on if food quality, good or bad on food.
  • Classifier 2: classification on if staff behavior, good or bad on service
  • Classifier 3: classification on overall experience, good or bad on overall experience.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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