1
$\begingroup$

I'm working on review data where each review is labeled as positive or negative. My aim is to find topics in those reviews which are perceived either positive or negative. Therefore I performed a LDA on this data where each input row is either a positive or negative review, i.e. my documents are of the two types 'positive review' or "negative review". The output of the LDA gives me rather diverse words within each topic, which are not easy to interpret.

However, when summing up the assigned probabilities for positive and negative documents, some of the topics receive clearly more probability mass from either positive or negative documents. I see this as an indicator that the topics are able to separate positive and negative documents.

In order to better interpret the output, i wanted to map the top 10 words in each topic of each document to the real vector space with w2v. This is done separately for the positive and negative documents. Then i want to do a k-means clustering on the two sets of vectors. My hope is that i will get clean interpretable clusters where i can take each centroid as a topic. The role of the LDA would then be a dimensionality reduction to a few words instead of the full review before i can do the clustering.

Does that approach make sense? What other alternatives would you suggest?

$\endgroup$
4
  • $\begingroup$ What do you mean by "topics which are perceived either positive or negative"? $\endgroup$ Commented Dec 7, 2017 at 10:29
  • 1
    $\begingroup$ Like for example that i would like to see that topic1 is showing up a lot in the positive reviews whereas topic2 shows up in negative reviews and maybe topic3 shows up equally likely in both types of documents $\endgroup$
    – Udo
    Commented Dec 7, 2017 at 11:28
  • $\begingroup$ You can train a binary classifier with features indicating detected topics. The classifier will automatically weight positive/negative features corresponding to topics, and you will be able to interpret the learned weights. $\endgroup$ Commented Dec 7, 2017 at 17:33
  • $\begingroup$ In your linear classifier, I would suggest to use L1-norm as it will prune features (setting weights to exactly 0) that don't contribute to class separation. The trained weights will be easier to interpret. $\endgroup$ Commented Dec 7, 2017 at 17:42

1 Answer 1

1
$\begingroup$

LDA doesn't really respect positive/negative topics by itself. There's a version of supervised-LDA, where in addition to the words, you provide the rating of the document, and in this case LDA will generate topics that correlate better with bad/good documents. Unfortunately, supervised LDA tends to be very slow, in particular because it's not easily parallelizable.

There are plenty of other supervised topic models, which you can look into.

One thing you could try is FastText, which tends to do very well on classification tasks. It will extract n-grams (up to an $n$ of your choice), and then assign each n-gram a score, which correlates with positivity/negativity. After running the model, you can take the most common n-grams, and rank them by their positivity score. Then limit your vocabulary to just the strongly positive/negative n-grams (you can break them down into individual words), and run LDA on this subset. I would think the topics you get should be much better distributed between positive/negative.

$\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.