One hot encoding

One hot encoding is the binary sparse vector representation of text. In this encoding, the resulting binary vector is all zero-value except at the position or index of the token where it is one. Let's look at it with an example. Suppose there are two sentences: This is Big Data AI Book. This is book explains AI algorithms on Big DataUnique tokens (nouns) for earlier sentences would be {data,AI,book,algorithms}The one hot encoding representation for these tokens would be like the following:

The Encoded Sparse Vector Representation would look like the following:

Get Artificial Intelligence for Big Data now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.