Keras
sentiment-analysis
lstm

Sentiment analysis with a Bidirectional LSTM

Binary sentiment classifier (positive / negative) for movie reviews, trained on the IMDB dataset.

Model

  • Embedding (20,000-word vocabulary, masked padding) -> SpatialDropout -> 2 stacked Bidirectional LSTM layers -> Dense -> sigmoid
  • Input: reviews cleaned, tokenised and padded to 400 tokens

Results

  • Test accuracy: 66.80%

Files

  • best_model.keras: trained Keras model
  • word_index.pkl: vocabulary used for tokenising
  • app.log: training log

Limitations

Trained only on movie reviews; may do poorly on other domains, sarcasm, or mixed-sentiment text.

Downloads last month
35
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train jainarika/sentiment-lstm