Skip to content

Sentiment Analysis on IMDB reviews dataset with multiple approaches

Notifications You must be signed in to change notification settings

mohammad0081/IMDB_reviews_classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMDB-Reviews-Classifier

Overview: This code, developed by Mohammad Hassan Heydari, implements a classifier for IMDB movie reviews. It uses the Keras library and TensorFlow Datasets to train a model that can classify movie reviews as positive or negative.

Features:

  • Loads the IMDB reviews dataset from TensorFlow Datasets.
  • Preprocesses the data by tokenizing and padding the sequences.
  • Builds a sequential model using an embedding layer, followed by a flatten layer, and two dense layers.
  • Compiles the model with binary cross-entropy loss and the Adam optimizer.
  • Trains the model on the padded training data for 10 epochs, using the validation data for evaluation.

Usage:

  1. Install the required dependencies, including Keras, TensorFlow Datasets, and numpy.
  2. Load the IMDB reviews dataset using the tfds.load() function.
  3. Preprocess the data by converting it to sequences and padding them using the Tokenizer and pad_sequences functions.
  4. Build the sequential model with an embedding layer, flatten layer, and dense layers.
  5. Compile the model with binary cross-entropy loss and the Adam optimizer.
  6. Train the model using the fit() function, providing the padded training data and labels, as well as the validation data.

Contributions: Contributions to this project are welcome. If you would like to contribute, please follow the guidelines mentioned in the repository.

License: This code is released under an open-source license. Please refer to the license file in the repository for more information.

Contact: If you have any questions or feedback regarding this code, feel free to contact Mohammad Hassan Heydari at [[email protected]].

Please note that this is a general description, and you may need to customize it further based on your specific project details and preferences.

About

Sentiment Analysis on IMDB reviews dataset with multiple approaches

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages