I want to develop a deep learning model to classify some comments and reviews. Here is a little description of the data structure:
Each comment could be related to one or more than one class such as comments about phone battery, or phone's OS, or other classes (type analysis).
Each comment (such as a comment about phone battery and its OS) could be positive or negative or neutral, just one of them (sentiment analysis).
Now the question is that, should I develop multi models (one model per each class) that the model has 3 sentiment outputs, like below:
DATA ==> TYPE DETECTION MODEL ==> output_1 (type of review)
DATA ==> SENTIMENT DETECTION MODEL ==> output_2 (sentiment of review)
REAL OUTPUT ==> output_1 output_2
Or should I develop one class that classify data through all possibilities (all types * all sentiments), like below:
DATA ==> DETECT TYPE AND SENTIMENT MODEL ==> REAL OUTPUT
Which one is the better way, or if there is another way that I don't know, I would appreciate it if you tell me.
CodePudding user response:
I would go with a sentiment analysis model and a binary classification model per topic.
I wouldn't combine the topic classification with the sentiment analysis. These are two separate tasks, and each deserves its own model.
As for the topic classification itself, I incline toward separate model per class, for two reasons:
First, this way we can get the full range of activations per class. If, for example, a text matches very well both class A and class B, we can expect the two corresponding models to indicate this, while if we used a single model, it's probable that only one of these classes will stand out.
Second, a model constructed with separate classifiers is more extendible. Adding another topic amounts to training a new classifier on that topic. If we go with one big classifier, adding a topic requires retraining the model on all topics.