Consider the IMDB data set. Use the first 4500 observations as the training subsample and the last

Question:

Consider the IMDB data set. Use the first 4500 observations as the training subsample and the last 1236 observations as the testing sample. Repeat the analyses of Section 8.4.4. Is the LSTM network helpful in the movie rating?

Data From Section 8.4.4:

To demonstrate the application of LSTM, we consider the well-known movie review data set IMDB, which is also available from the keras package. The dependent variable is binary “1” or “0” (approval or disapproval) and the predictors consist of comments from the reviewers. Following the approach commonly used for the data set, we use exactly 100 words of every review. If a review is less than 100 words, we pad with a special word coded as zeros. This preprocessing of the predictors can be carried out using the command pad_sequences of the package. Since words in a review are connected RNN and LSTM appear to be useful. We start our analysis with a RNN. The analysis is then followed by a LSTM network so that the contribution of LSTM can be assessed. The data set has 5736 reviews, and we use the first 4000 as the training subsample and the last 1736 as the testing subsample. The commands used to preprocessing of predictors are given in the attached R demonstration.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: