Prepare data for text classification using Scikit Learn SVM

后端 未结 1 593
一个人的身影
一个人的身影 2020-12-23 08:57

I\'m trying to apply SVM from Scikit learn to classify the tweets I collected. So, there will be two categories, name them A and B. For now, I have all the tweets categorize

相关标签:
1条回答
  • 2020-12-23 09:14

    Have a look at the documentation on text feature extraction.

    Also have a look at the text classification example.

    There is also a tutorial here:

    http://scikit-learn.org/stable/tutorial/text_analytics/working_with_text_data.html

    In particular don't focus too much on SVM models (in particular not sklearn.svm.SVC that is more interesting for kernel models hence not text classification): a simple Perceptron, LogisticRegression or Bernoulli naive Bayes models might work as good while being much faster to train.

    0 讨论(0)
提交回复
热议问题