IMDB Sentiment Analysis using Neural Networks

Aenu Rizqiana

Sosial Media


0 orang menyukai ini
Suka

Summary

The title of the portfolio is "IMDB Sentiment Analysis using Neural Networks with TensorFlow". In this portfolio, I implemented sentiment analysis on IMDb reviews using neural networks with the TensorFlow library. I utilized the IMDb dataset available through TensorFlow Datasets and split it into training data, validation data, and test data.

I employed the TensorFlow Hub embedding layer to apply text vector representations in the neural network model. I constructed the neural network model with the embedding layer as the first layer, followed by several hidden layers and an output layer.

After building the model, I compiled it using the Adam optimizer and the BinaryCrossentropy loss function. Subsequently, I performed an initial evaluation of the model on the test data without prior training, obtaining metrics such as loss and accuracy.

Next, I trained the model on the training data for multiple epochs. I tracked the training history to observe the model's accuracy at each epoch. Finally, I created a graph depicting the increase in model accuracy with the number of epochs.

This portfolio showcases a practical implementation of IMDb sentiment analysis using neural networks with TensorFlow.

Description

Downloading the IMDb dataset using TensorFlow Datasets and splitting it into training, validation, and testing sets.

Utilizing the TensorFlow Hub layer for text embedding. The hub layer wraps a callable object from TensorFlow Hub, which provides token-based text embedding trained on the English Google News 130GB corpus.

Building a neural network model using the TensorFlow Sequential API. We add the hub layer as the first layer, followed by a Dense layer with 16 units and ReLU activation, and a final Dense output layer.

Compiling the model with the Adam optimizer, BinaryCrossentropy loss function, and accuracy metric.

Evaluating the model's performance on the test data without training it yet.

Training the model on the training data for 20 epochs using the fit() method.

Creating a graph to visualize the accuracy of the model across epochs.

Summary:

In the graph of Epochs Vs. Accuracy graph contained in the portfolio, it can be seen that as the number of epochs (training iterations) increases, the accuracy of the model increases significantly.

At the beginning of the training, the accuracy of the model is still low, but as the epochs progress, the accuracy gradually increases. This shows that the model is learning and adjusting to the training data. The model successfully captures the patterns in the data and improves its prediction ability.

The graph shows a consistent increase in accuracy as the number of epochs increases. Thus, the Epochs Vs. Accuracy graph provides a visual representation of the model's ability to learn patterns from the training data over time (epochs) and improve its prediction accuracy.

Informasi Course Terkait
  Kategori: Artificial Intelligence
  Course: Deep Learning dengan TensorFlow