July 2018
Beginner to intermediate
146 pages
3h 39m
English
CountVectorizer is the simplest type of vectorizer and is best explained with the help of an example. Imagine that we have three documents, A, B, and C, which are as follows:
We now have to convert these documents into their vector forms using CountVectorizer. The first step is to compute the size of the vocabulary. The vocabulary is the number of unique words present across all documents. Therefore, the vocabulary for this set of three documents is as follows: the, sun, is, a, star, my, love, like, red, rose, mary, had, little, lamb. Consequently, the size of the vocabulary is 14.
It is common practice to not include extremely common words ...
Read now
Unlock full access