AI engineering glossary · Feature engineering data prep
What is count vectorizer?
Count vectorizer (also called CountVectorizer): A tool that converts a collection of text documents into a matrix of word counts, with rows for documents and columns for vocabulary terms. It is the standard way to build bag-of-words features.
Count vectorizer: an example
Three short SMS messages are turned into a 3 x 20 matrix of counts over a 20-word vocabulary using CountVectorizer.
Related terms
More Feature engineering data prep terms
- Cyclical encoding
- Datetime features
- Discretization
- Domain knowledge features
- Dummy variable
- Dummy variable trap
- Duplicate removal
- Embedded method
Where you learn it
Count vectorizer is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.