문제

I have implemented the KNN classifier in java and I got a strange result. If I do a sentiment analysis on a dataset example amazon books review I got 55% precision. From 100 test document 55 correctly classified as negative or positive review and 45 incorrectly. But If I use the KNN for category classification example camera or books then I got 95% precision.

There are some explanation my code is wrong? Any idea?

도움이 되었습니까?

해결책

@Christopher Pfohl is right. They are different approaches with one key difference for you. Sentiment analysis (based on simple Bag of Words) is much more complicated, in general, than category classification in your case.

Btw, just one clarification, 55% is not precision, that is accuracy. (More info: http://en.wikipedia.org/wiki/Accuracy_and_precision#In_binary_classification)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top