Document-Term Matrix

Also known as · DTM

A matrix with one row per document and one column per term, filled with word counts. It is the stack of Bag of Words vectors, and is mostly zeros (sparse).

When to use

It is a feature matrix like those of Lectures 3 to 5, with each word as a feature and each review as a data point, so earlier techniques apply. For nn reviews and a vocabulary of VV words the shape is n×Vn \times V (for example 1000×8001000 \times 800), and CountVectorizer builds it in scikit-learn.

See Lec 7.

Appears in

No references yet.