In the previous chapter, we used a recurrent neural network to develop a movie review sentiment classification model for text data that are characterized by a sequence of words. Long Short-Term Memory (LSTM) neural networks are a special type of Recurrent Neural Networks (RNNs) that are useful with data involving sequences and provide advantages that we will discuss in the next section. This chapter illustrates the steps for using an LSTM neural network for sentiment classification. The steps involved in applying an LSTM network to a business problem may include text data preparation, creating the LSTM model, training the model, and assessing the model performance.
More specifically, in this chapter, we will cover the following topics:
- Why do we use LSTM networks?
- Preparing text data for model building
- Creating a long short...