Giter Site home page Giter Site logo

vinayak1998 / amazon-rating-prediction Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 21.37 MB

Predicting Amazon ratings based on reviews by Text Classification using the Naive Bayes Algorithm.

License: MIT License

Shell 0.28% Python 99.72%
text-classification bag-of-words naive-bayes-classifier rating-prediction natural-language-processing bigram-model data-preprocessing

amazon-rating-prediction's Introduction

Text Classification using naive bayes

Predicting Amazon ratings based on reviews by Text Classification using the Naive Bayes Algorithm.

Name

naive - Run the executable program for Naive Bayes

Synopsis

./naive <part> <tr> <ts> <output>

Description

This program will train naive bayes model using given code on train data, make predictions on test data and write final predictions in given output file.

Options

  • PART

    Part i.e. a,b or c

  • TR

    File containing training data in csv format where 1st entry is the target

  • TS

    File containing test data in csv format where 1st entry is the target

  • OUT

    Output file (write your predictions in this file)

Example

./naive a train.csv test.csv output

Parts

  • Part A

    • Used Unigrams as features
    • Used Laplace Smoothing to avoid zero probabilities(c = 1)
    • Used Logarithms to avoid underflow issues
    • Implemented everything from the First Principles and not usde any existing R/python modules.
  • Part B

    • All in Part A plus some Pre-Processing
    • Stopword Removal(nltk)
    • Stemming(nltk)
    • String Cleaning
  • Part B

    • Feature Engineering
    • Lemmatization
    • Used Bigrams as features

Data

  • amazon_train.csv: Train data
  • amazon_test_public.csv: Public Test data

Note: In the Public test data, actual class labels are replaced with -1

amazon-rating-prediction's People

Contributors

vinayak1998 avatar

Watchers

 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.