Annette-s-Responses

View on GitHub

July 28, 2020

Word Embeddings

  1. Question 1: Why is using one-hot encoding an inefficient towards vectorizing a corpus of words? How are word embeddings different? (see this video https:// www.youtube.com/watch?v=EEk6OiOOT2c)
    • If we one hot encode the phrases, it would look something like:

image

image

  1. Compile and train the model from the tensorflow exercise. Plot the training and validation loss as well as accuracy. Post your plots and describe them.

image

image

Text Classification with an RNN

  1. Again compile and train the model from the tensorflow exercise. Plot the training and validation loss as well as accuracy. Stack two or more LSTM layers in your model. Post your plots and describe them. An RNN, or Recurrent Neural Network, works with sequences of data. Rather than passing through one layer and then another, these networks link each layer by sending certain information back into previous layers. This not only works on the input information, but past information given to the network. Recurrent layers include LSTM (Long Short Term Memory) and GRU (Gated Recurrent Units). LSTMs are capable of learning long-term dependencies in order to find patterns across time. LSTMs work best for classifying, processing, and predicting when using time series data.

WITHOUT LSTM

image image

WITH LSTM

image image