Skip to content

venu211007-source/Sentiment-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Movie Review Sentiment Analysis

A machine learning project that classifies movie reviews as positive or negative using Natural Language Processing (NLP) and Logistic Regression.

Problem Statement

Manually reading thousands of reviews to understand audience sentiment is impractical. This project automates sentiment detection, which streaming platforms like Netflix and Prime Video use to understand user taste profiles and improve recommendations.

Dataset

  • IMDB Dataset of 50K Movie Reviews from Kaggle
  • 50,000 movie reviews labeled as positive or negative

Tech Stack

  • Python 3
  • pandas — data loading and manipulation
  • scikit-learn — machine learning and text vectorization
  • TfidfVectorizer — converts text to numerical features
  • Logistic Regression — classification algorithm

How It Works

  1. Load and clean the dataset
  2. Convert sentiment labels to numbers (positive = 1, negative = 0)
  3. Convert review text to numerical vectors using TF-IDF
  4. Train a Logistic Regression model on 80% of the data
  5. Test on the remaining 20% and measure accuracy

Result

Accuracy: 89.14% on test data.

How to Run

  1. Clone this repository
  2. Install dependencies: pip install -r requirements.txt
  3. Place IMDB Dataset.csv in the project folder
  4. Run: python sentiment_analysis.py

Project Structure

sentiment-analysis/ ├── sentiment_analysis.py ├── IMDB Dataset.csv ├── requirements.txt └── README.md

About

Machine learning-based sentiment analysis system that classifies movie reviews as positive or negative using NLP techniques and text classification models.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages