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:
I 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.