I have a data set of 1000 Amazon "art" category reviews. I want to classify Positive +1, Negative -1, Neutral 0 Ratings using user reviews. The final Naive Bayes classifier only predicts 0 for all training sample. I will write my process of building the classifier and want to know why it's failing to classify other classes.
- Find all unique words in the 1000 reviews and stem the words (ex: pleased, pleasing -> please).
- Build Feature matrix (1000 X Size of Unique words vector) where each element is # of times the unique word appears in the document
- By-row operation multiply by idf -> A 1 X (# of Unique words vector). (# of Documents / # of documents word (i) appears)
- Set Y as 3 factors (-1,0 or 1) 1000 X 1
- Train and predict
Results:
actual
predicted -1 0 1
-1 0 0 0
0 150 92 758
1 0 0 0
Am I missing something in the mix? I will post code if requested but I believe my processes are done correctly.