convnetjs icon indicating copy to clipboard operation
convnetjs copied to clipboard

SVM to classify text sentences

Open koustuvsinha opened this issue 10 years ago • 2 comments

Hi, newbie machine learner here. I am trying to classify news articles based on their headlines, mainly into two classes : "crime" and "non crime". I have used Natural's NaiveBayes Classifier, but I want to improve upon the accuracy. Will SVM improve the prediction, and if so please guide me how to implement it using your library! Btw, i love reading your blog and got to learn a lot from there :) Please do complete the book, eagerly waiting for the remaining chapters!

koustuvsinha avatar Aug 24 '15 08:08 koustuvsinha

Same here, looking forward to a demo using SVM for classification! Definitely need guide to implement it in js. Previously I used python to do all these work.

JingLiNaomi avatar Apr 28 '17 06:04 JingLiNaomi

You wont be able to directly provide text. You need to convert them into features with techniques such as Bag of words model , rows of concurrent matrices or Word2Vec. The library Natural allows people to add sentences directly as it would allow users to get the job done with as little Machine Learning and Natural Language Processing as possible , which does not always work for all corpora's so featuring text custom to your copora is helpful. But , in ConvnetJs its a compulsion to featurize your text.

kamathhrishi avatar Oct 13 '17 02:10 kamathhrishi