Skip to content

The project aims at classifying the various reviews on the specified drugs based on their polarity with the aid of their rating (Course: CSL2050 Pattern Recognition and Machine Learning)

Notifications You must be signed in to change notification settings

DarshitJain04/Sentiment-Analysis-of-Drug-Reviews

 
 

Repository files navigation

Open In Colab

Built With

Code Structure

1. Pill_Recommendation.ipynb

This is the main file with all the preprocessing, EDA and Machine learning and Deep Learning Models.

  • Installing libraries and Dependencies
  • Importing dataset - UCI ML Drug Review Dataset
  • Exploratory Data analysis
  • Data preprocessing - Basic data information, cleaning up the data
  • Dividing into test and train and transforming using Count Vectorise
  • Applying Machine Learning models
  • Applying Deep learning Models
  • Applying Harvard Sentiment Dictionary Analysis
  • Classifier Combination - Voting

2. Emotional_Analysis.ipynb

This contains the emotional analysis done on the reviews using NRC Lexicon Library.

  • It contains the same preprocessing as the above file.
  • Post that NRC Lexicon library is explored.
  • Reviews are passed to the library functions to get the emotion scores.

How to run

  1. Run the Pill_Recommendation.ipynb file first.
  • The SVM code keeps crashing hence those cells should be avoided while running.
  • LSTM takes about 1.5 hrs to complete running.
  • The predictions from all the models are collected and stored in a .csv file.
  • The final prediction scores calculated are also stored in a .csv file at the end.
  1. Run the Emotional_Analysis.ipynb file after that.
  • It is a completely separate entity from the Pill_Recommendation.ipynb file. The results from both the files are used to predict data based on the reviews and rating as shown on the deployed website.
  • It takes 6 hours to run.

Collaborators

Name Year Branch
Harsh Agarwal Sophomore EE
Aditi Goyal Sophomore EE
Darshit Jain Sophomore EE

About

The project aims at classifying the various reviews on the specified drugs based on their polarity with the aid of their rating (Course: CSL2050 Pattern Recognition and Machine Learning)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%