Skip to content

ciphermosaic/Sentiment-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentiment Analysis using RNN (PyTorch)

📌 Overview

This project implements a Recurrent Neural Network (RNN) for sentiment analysis on the IMDB movie reviews dataset using PyTorch. The model classifies reviews as positive or negative.


🚀 Features

  • Built using PyTorch
  • Uses RNN architecture
  • Trained on IMDB dataset
  • Binary sentiment classification
  • Preprocessing with tokenization and padding

🧠 Model Architecture

  • Embedding Layer
  • RNN Layer
  • Fully Connected Layer
  • Sigmoid Activation

📂 Project Structure

sentiment-rnn/
│
├── sentiment_rnn.ipynb   # Main notebook (Google Colab)
├── requirements.txt
├── .gitignore
└── README.md

⚙️ Installation

Clone the repository:

git clone https://github.com/Fahad9009/Sentiment-analysis.git
cd sentiment-analysis

Install dependencies:

pip install -r requirements.txt

▶️ Usage

Run the notebook:

  • Open main.ipynb in Google Colab
  • Execute all cells

📊 Dataset

  • IMDB Movie Reviews Dataset
  • 50,000 reviews labeled as positive or negative

📈 Results

  • Model trained with RNN
  • Achieved good accuracy on validation data (mention yours if needed)

🛠️ Tech Stack

  • Python
  • PyTorch
  • NumPy
  • Pandas

📄 License

MIT License

About

This project implements a **Recurrent Neural Network (RNN)** for sentiment analysis on the **IMDB movie reviews dataset** using PyTorch. The model classifies reviews as **positive or negative**.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors