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.
- Built using PyTorch
- Uses RNN architecture
- Trained on IMDB dataset
- Binary sentiment classification
- Preprocessing with tokenization and padding
- Embedding Layer
- RNN Layer
- Fully Connected Layer
- Sigmoid Activation
sentiment-rnn/
│
├── sentiment_rnn.ipynb # Main notebook (Google Colab)
├── requirements.txt
├── .gitignore
└── README.md
Clone the repository:
git clone https://github.com/Fahad9009/Sentiment-analysis.git
cd sentiment-analysis
Install dependencies:
pip install -r requirements.txt
Run the notebook:
- Open
main.ipynbin Google Colab - Execute all cells
- IMDB Movie Reviews Dataset
- 50,000 reviews labeled as positive or negative
- Model trained with RNN
- Achieved good accuracy on validation data (mention yours if needed)
- Python
- PyTorch
- NumPy
- Pandas
MIT License