Sentiment analysis of text
IMDb includes 50k movie reviews to be classified as being positive or negative. To pre-process the data, we extract the 1000 most frequent words and tokenize each review into an array of token indices. Less frequent words are ignored, and each review array is padded to length 500. We adopt the LSTM model [1]} to perform the classification, with two layers, embedding dimension 64, and hidden dimension 128. We use the Adam optimizer [2]} with learning rate 0.001 to minimize the binary cross entropy loss. We hold back 25% of the dataset for testing.
