{"id":22116163,"url":"https://github.com/blacksujit/sentiment-analysis","last_synced_at":"2025-03-24T05:31:00.898Z","repository":{"id":261445227,"uuid":"861024519","full_name":"Blacksujit/Sentiment-Analysis","owner":"Blacksujit","description":"This project is a sentiment analysis model built to classify IMDB movie reviews as either positive or negative using the **IMDB dataset**. It uses various machine learning models and deep learning techniques to handle the text data.","archived":false,"fork":false,"pushed_at":"2024-11-12T17:00:04.000Z","size":44957,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T11:22:46.534Z","etag":null,"topics":["challenge","deep-learning","deep-neural-networks","lstm-neural-networks","model-accuracy","nlp","nlp-datasets","nlp-machine-learning","polarity-integration","proficient","rqs","score","sentiment-analysis","sentiment-classification"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Blacksujit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-21T19:47:21.000Z","updated_at":"2024-11-14T15:13:46.000Z","dependencies_parsed_at":"2024-12-01T12:29:36.708Z","dependency_job_id":null,"html_url":"https://github.com/Blacksujit/Sentiment-Analysis","commit_stats":null,"previous_names":["blacksujit/sentiment_analysis","blacksujit/sentiment-analysis"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blacksujit%2FSentiment-Analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blacksujit%2FSentiment-Analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blacksujit%2FSentiment-Analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blacksujit%2FSentiment-Analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Blacksujit","download_url":"https://codeload.github.com/Blacksujit/Sentiment-Analysis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245216562,"owners_count":20579182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["challenge","deep-learning","deep-neural-networks","lstm-neural-networks","model-accuracy","nlp","nlp-datasets","nlp-machine-learning","polarity-integration","proficient","rqs","score","sentiment-analysis","sentiment-classification"],"created_at":"2024-12-01T12:19:41.595Z","updated_at":"2025-03-24T05:31:00.879Z","avatar_url":"https://github.com/Blacksujit.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IMDB Movie Reviews Sentiment Analysis:\r\n\r\nThis project is a sentiment analysis model built to classify IMDB movie reviews as either positive or negative using the **IMDB dataset**. It uses various machine learning models and deep learning techniques to handle the text data.\r\n\r\n## Table of Contents:\r\n\r\n- [Overview](#overview)\r\n- [Dataset](#dataset) \r\n- [Models](#models)\r\n- [Aspect-Based Sentiment Analysis](#aspect-based-sentiment-analysis)\r\n- [Results](#results)\r\n- [Video Explanation](#VideoExplanation)\r\n\r\n\r\n\r\n## Project Video Demo:\r\n\r\n[Click To Watch the video demonstration](https://go.screenpal.com/watch/cZQv6qVS7Qa)\r\n\r\n\r\n## Overview:\r\n\r\nThis project performs binary classification on the IMDB dataset, where movie reviews are classified into positive (1) and negative (0) sentiments. It uses various machine learning algorithms and an LSTM-based deep learning model for comparison.\r\n\r\nThe steps involved:\r\n1. Preprocess the data (tokenization, vectorization, and padding).\r\n2. Build models using different algorithms.\r\n3. Train the models.\r\n4. Evaluate their performance.\r\n5. Save the best model for future predictions.\r\n\r\n## Dataset:\r\n\r\nThe dataset used is the **[IMDB movie reviews dataset](\u003cIMDB Dataset.csv\u003e)** consisting of 50,000 reviews split equally between training and testing sets.\r\n\r\n- **Positive reviews**: 25,000\r\n- **Negative reviews**: 25,000\r\n\r\nThe dataset is split into training and validation sets for model training and evaluation.\r\n\r\n## Models:\r\n\r\nWe tested the following machine learning models on the dataset to determine their performance:\r\n\r\n### 1. **Naive Bayes**\r\n   - Model: Multinomial Naive Bayes with TF-IDF vectorization.\r\n   - **Accuracy**: 85.55%\r\n\r\n### 2. **Logistic Regression**\r\n   - Model: Logistic Regression with TF-IDF vectorization.\r\n   - **Accuracy**: 89.29%\r\n\r\n### 3. **Naive Bayes (Small Dataset)**\r\n   - Model: Multinomial Naive Bayes on a subset of the dataset.\r\n   - **Accuracy**: 84.60%\r\n\r\n### 4. **Gradient Boosting**\r\n   - Model: Gradient Boosting Classifier with TF-IDF vectorization.\r\n   - **Accuracy**: 80.35%\r\n\r\n### 5. **LSTM (Deep Learning Model)**\r\n   - Model: An LSTM (Long Short-Term Memory) neural network to capture sequential dependencies in text data.\r\n   - **Accuracy**: 64.27%\r\n\r\n### Model Architecture (for LSTM):\r\n1. **Embedding Layer**: Converts integer-encoded words into dense vectors.\r\n2. **LSTM Layer**: Captures long-term dependencies in review sequences.\r\n3. **Dropout Layer**: Helps prevent overfitting.\r\n4. **Dense Layer**: Sigmoid-activated output layer for binary classification.\r\n\r\n## Aspect-Based Sentiment Analysis\r\n\r\nIn addition to traditional sentiment analysis, this project explores **Aspect-Based Sentiment Analysis (ABSA)**, which focuses on identifying sentiments related to specific aspects of the movies. For example, a review might express a positive sentiment towards the acting but a negative sentiment towards the plot. This allows for more granular insights, such as:\r\n\r\n- **Improving Movie Attributes**: By understanding which aspects of a movie are well-received and which are not, filmmakers and marketers can make informed decisions on what to emphasize in future projects.\r\n- **Targeted Recommendations**: Users can receive recommendations based on specific attributes they care about (e.g., great cinematography or compelling storylines).\r\n- **Enhanced Customer Feedback**: Businesses can better understand customer feedback and improve their products based on specific strengths and weaknesses highlighted in reviews.\r\n\r\n## Results\r\n\r\nThe LSTM model is a simple neural network architecture, achieving a lower accuracy compared to traditional machine learning models like Naive Bayes and Logistic Regression. Below is a summary of the model performances:\r\n\r\n- **Naive Bayes**: 85.55%\r\n- **Logistic Regression**: 89.29%\r\n- **Naive Bayes (Small Dataset)**: 84.60%\r\n- **Gradient Boosting**: 80.35%\r\n- **LSTM**: 64.27%\r\n\r\nThe best performing model in this case was **Logistic Regression** with an accuracy of **89.29%**.\r\n\r\n---\r\n\r\n### Review Quality Score (RQS)\r\n\r\nIn this analysis, we also incorporate a **Review Quality Score (RQS)**, which measures the quality of reviews based on various factors such as length, sentiment strength, and engagement metrics (like the number of likes). The benefits of using RQS include:\r\n\r\n- **Quality Over Quantity**: By focusing on reviews with higher RQS, the model can leverage more insightful data, leading to better predictions.\r\n- **Filtering Noise**: Lower quality reviews can skew sentiment analysis, but using RQS helps filter out less informative reviews.\r\n- **Informed Model Training**: Higher quality reviews contribute to more robust training data, potentially improving model accuracy.\r\n\r\n---\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacksujit%2Fsentiment-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblacksujit%2Fsentiment-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacksujit%2Fsentiment-analysis/lists"}