Giter Club home page Giter Club logo

sentimentanalysis's Introduction

Movie Reviews Sentiment Analysis using machine learning

Implemented text analysis using machine learning models to classify movie review sentiments as positive or negative. Built using Python 3.6.1.

  1. Tuned CountVectorizer (1_gram) to get appropriate features/tokens and then transformed to obtain input variable (document term matrix).
  2. Splitted training test with test size of 20%
  3. Used the following models to train on training data.
    • Naive Bayes
    • Logistic Regression
    • SVM (Support Vector Machine)
    • KNN (K Nearest Neighbors)
  4. Tested models on test data and calculated accuracy of predictions
  5. The results were as follows:
    • Naive Bayes: 98.9161849711%
    • Logistic Regression: 99.3497109827%
    • SVM: 99.0606936416%
    • KNN: 98.6994219653%
  6. Analysed further by observing confusion matrix
  7. Used Naive Bayes model to observe the number of tokens (words) and the positivity/negativity associated with that word.
  8. Implemented searching of selected words in the pandas dataframe to analyse specific words in the feature sets
  9. Used the most accurate model (Logistic Regression) to train on the entire dataset. df
  10. Took custom review inputs and predicted Positive/Negative review.

Dataset Source (from Kaggle): https://inclass.kaggle.com/c/si650winter11/data

sentimentanalysis's People

Contributors

abhinavthukral97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.