DeepSentiment is a deep learning-based sentiment analysis project designed to classify movie reviews from the IMDb dataset as positive or negative. The model leverages a Bidirectional Long Short-Term Memory (LSTM) network with a self-attention mechanism to capture both the sequential dependencies and contextual relationships within the text.
- State-of-the-Art Architecture: Utilizes a powerful combination of Bidirectional LSTM and self-attention, known for its effectiveness in natural language processing tasks.
- High Accuracy: Achieves an impressive 89.26% accuracy on the IMDb test set, demonstrating strong performance in sentiment classification.
- Open to Contributions: Contributions from the community are welcome to further enhance and improve the model.
-
Clone the Repository:
git clone [https://github.com/](https://github.com/)tafartech/DeepSentiment.git cd DeepSentiment
-
Install Dependencies:
pip install -r requirements.txt
-
Download the IMDb Dataset: (If not already included)
python download_imdb.py
-
Train the Model:
python train.py
-
Evaluate the Model:
python evaluate.py
The trained model achieves an accuracy of 89.26% on the IMDb test set. You can find the confusion matrix and classification report in the results
Output.
Some areas where you can help:
- Hyperparameter Tuning: Explore different configurations to find optimal values for learning rate, batch size, and model architecture parameters.
- Regularization Techniques: Experiment with L2 regularization, additional dropout layers, or other methods to address the slight overfitting observed in the validation loss.
- Alternative Architectures: Try implementing different neural network architectures like Convolutional Neural Networks (CNNs) or incorporating pre-trained word embeddings like GloVe or Word2Vec.
- Ensemble Methods: Investigate the use of ensemble learning techniques to combine multiple models and potentially achieve higher accuracy.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name
). - Make your changes and commit them (
git commit -m 'Add your feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Open a pull request.
Let's collaborate to make DeepSentiment even better.