Skip to content

Glossary: Unsupervised Learning

TF-IDF (term frequency times inverse document frequency)

Also written: TF-IDF, TfidfVectorizer, tfidf

A word score that is high for words frequent in one message but rare across all messages, so 'coupon' scores high and 'the' near zero. It turns each message into a row of numbers that k-means can group.

Where the book teaches it

Related terms

stop wordssparse matrixcosine distancemin_dfvocabulary