So far, we have used a maximum length of 100 for padding sequences of movie reviews in the train and test data. Let's look at the summary of the length of movie reviews in the train and test data using the following code:
# Summary of padding sequencesz <- NULLfor (i in 1:25000) {z[i] <- print(length(train_x[[i]]))} Min. 1st Qu. Median Mean 3rd Qu. Max. 11.0 130.0 178.0 238.7 291.0 2494.0 z <- NULLfor (i in 1:25000) {z[i] <- print(length(test_x[[i]]))} Min. 1st Qu. Median Mean 3rd Qu. Max. 7.0 128.0 174.0 230.8 280.0 2315.0
From the preceding code, we can make the following observations:
- From the summary of the length of movie reviews in the train data, we can see that the minimum length is 11, ...