The last example in this chapter is about dealing with temporal sequences; more specifically, we will see how to deal with text, which is a variable-length sequence of words.
Some data-science algorithms deal with text using the bag-of-words approach; that is, they don't care where the words are and how they're placed in the text, they just care about their presence/absence (and maybe their frequency). Instead, a special class of deep networks is specifically designed to operate on sequences, where the order is important.
Some examples are as follows:
-
Predict a future stock price, given its historical data: In this case, the input is a sequence of numbers, and the output is a number
-
Predict whether the ...