A topic vector is a column of V whose entries show how strongly the vocabulary terms contribute to one latent topic. In latent semantic analysis, topic vectors provide a lower-dimensional topic space for representing documents. section 4.6.2
Topic vectors support dimensionality reduction through this workflow:
- Compute principal vectors from the document-term matrix X, using eigenvectors of XᵀX or its covariance matrix. section 4.6.2
- Use the diagonal values of S as topic-importance weights, choose a cutoff, and discard lower-weight topics by removing columns of V. section 4.6.2
- Project X onto the retained topic vectors to obtain document representations, then compare documents with cosine similarity in topic space. section 4.6.2
Toy document collection
A document-term matrix includes terms such as “violence,” “gun,” “America,” and “roses.” A topic vector assigns one contribution to each vocabulary term, while projecting documents into the retained topic space can reveal indirect similarities. section 4.6.2
Table 4.1 Document matrix for the toy example dataset
|
|
Violence |
Gun |
America |
⋯ |
Roses |
|---|---|---|---|---|---|
| d0 |
0 |
0 |
0 |
⋯ |
2 |
| d1 |
1 |
1 |
1 |
⋯ |
0 |
| d2 |
2 |
2 |
0 |
⋯ |
0 |
| d3 |
3 |
3 |
0 |
⋯ |
0 |
| d4 |
5 |
5 |
0 |
⋯ |
0 |
| d5 |
0 |
1 |
0 |
⋯ |
0 |
| d6 |
1 |
0 |
0 |
⋯ |
0 |
Inspect the toy document matrix to see how term counts provide the input from which topic vectors are derived. section 4.6.2

