سؤال

How to incrementally train SGDClassifier available in Sklearn linear models for sentences. It is usually trains with docs.But i want to train it with sentences one by one.I want to incrementally train it for tweets for sentiment analysis.Any explanation with example in python will be great help.

Task: Sentiment Analysis of Tweets Doubt: Incrementally training on labelled Tweets

Thanks in advance.

هل كانت مفيدة؟

المحلول

Just make list of sentences for example

sents=["I am x","I am Y"]

then transform it using HashingVectorizer and then use partial_fit to train it incrementally. This worked for me.

Thanks

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top