Twitter-Sentiment-Analysis

Using Logistic Regression

  1. Gradient Descent to train the model
  2. Data Preprocessing involve tokenization, stemming, removing stop words and punctuations.
  3. Sigmoid function to build the model

Using Naive Bayes

  1. Data Preprocessing involve tokenization, stemming, removing stop words and punctuations.
  2. Calculating conditional probabilities using laplacian smoothing
  3. Train the model using principles of naive bayes theorem, where P(posterior)= P(prior) * (liklihood)
  4. Calculating positive to negative ratio for a word

Dependencies

  • pdb
  • nltk
  • numpy
  • pandas
  • string
  • math