Giter Site home page Giter Site logo

review-classifier's Introduction

Multinomial Naive Bayes Classifier in Python to classify reviews as positive or negative

The project was done in 4 phases:

  1. Collection of product reviews from e-commerce websites and labeling them as positive or negative. This collection was used as Training set.
  2. Creation of "vocabulary" from the training set after removal of stop words like "is", "was", "he/she" etc.
  3. Training a multinomial naive bayes model with laplace/add one smoothing. Both the unigram and bigram features were used for this model.
  4. Ten fold cross validation to get accuracy measurements.

Team Members

  • Aditya Kumar
  • Anand MP
  • Sachin T Sany

Accuracy using Unigram:

Test file - Accuracy(%)
data1.txt   74.54545454545455
data2.txt   72.72727272727273
data3.txt   63.63636363636364
data4.txt   69.09090909090909
data5.txt   74.54545454545455
data6.txt   74.54545454545455
data7.txt   67.27272727272727
data8.txt   65.45454545454545
data9.txt   49.09090909090909
data10.txt  63.79310344827587

Average accuracy using Unigram:

67.47%

Accuracy using Bigram:

Test file - Accuracy(%)
data1.txt   96.36363636363636
data2.txt   90.90909090909091
data3.txt   92.72727272727272
data4.txt   98.18181818181818
data5.txt   96.36363636363636
data6.txt   92.72727272727272
data7.txt   92.72727272727272
data8.txt   96.36363636363636
data9.txt   98.18181818181818
data10.txt  91.37931034482759

Average accuracy using Bigram:

94.59%

License

This project is licensed under the MIT License - see the LICENSE file for details

review-classifier's People

Contributors

aditya30394 avatar

Watchers

James Cloos 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.