I am classifying text using fastText which is a word2vec library that can also create vectors for character level n-grams and I have successfully trained a binary classifier.
Now I’d like to see what words or subword n-grams are the most predictive of a class for the two classes (e.g. if classifier sees a word
forest or a subword
res then that might be a strong indication that the document has label
Nature, but if it sees word “and” then that is probably not very informative for this classification task).
Therefore, I guess the question could be phrased as:
Given vectors representing words and subwords and a trained fastText classifier, what would be the best way to get a list of e.g. top 10 most informative words and subwords for deciding which class a sample belongs to?
Even though I’d be glad if you could make specific suggestions that consider my current setup with fastText, I’m also open to the more general solution suggestions.