I'm trying to teach myself a bit about machine learning, so one of the first things I did was implement a KNN classifier in ruby. My goal was to classify text product reviews into 8 classes:books-positivebooks-negativekitchen-positivekitchen-negative dvd-positivedvd-positiveelectronics-positiveelectronics-negativeI created features from my reviews by converting them into a set of bi_grams, removing stop words and then using a bag of words model. I calculate the closeness of feature by euclidean distance.However the result wasn't very good, the max percentage of correct classifications I've gotten is about 28% which is little better than just guessing. Are there any one know of anymore improvements I can make to my classifier to make it better? Or any resources I can use to research from. I've included my source code and training/testing data below if anyone wants to take a look.https://pastebin.com/x6DbQttshttps://pastebin.com/jDBsndPxhttps://pastebin.com/SKikxz5G
How can I improve my KNN classifier?
machine learning;nearest neighbour