Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 611 Bytes

README.md

File metadata and controls

23 lines (20 loc) · 611 Bytes

Sentiment Analysis with Naive Bayes

  • Naive Bayes
  • Add-1 smoothing
  • 10-fold cross validation
  • regular expression detecting negation words

Besides the regular Naive Bayes method, the code also realized:

  • Boolean Naive Bayes
  • Naive Bayes with stop word
  • Naive Bayes with negation features (not, never, n't)

Accuracy:

  • Regualr NB: 81.65%
  • Boolean NB: 73.85%
  • NB with stop word filterd: 81.10%
  • NB with negation features: 81.80%

Support Vector Machine:

  • sklearn LinearSVC
  • 10-fold cross validation
  • accuracy 88.45%