February 2019
Beginner to intermediate
308 pages
7h 42m
English
How do we create a similar vector/matrix for words so that they can be used as input to our neural network? In earlier chapters, we saw how categorical variables such as the day of week can be one-hot encoded to numerical variables by creating a new feature for each variable. It may be tempting to think that we can also one-hot encode our sentences in this manner, but such a method has significant disadvantages.
Let's consider phrases such as the following:
The following diagram shows a one-hot encoded two-dimensional representation of these phrases:

In this vector representation, the phrase ...