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?