EasyDeepLearn

TF-IDF weighting — formula and rationale.

easy

Answer

  • TF: term frequency in document (raw, log, or sublinear).
  • IDF: log(N  /  dft)\operatorname{log}(N\; / \;\mathrm{df}_{t}) — downweights common words appearing in many documents.
  • Product TF-IDF highlights terms specific to a document.
  • Uses: bag-of-words features, BM25 (probabilistic IDF variant, dominant in classical IR).
  • Modern hybrid: BM25 + dense embeddings for retrieval → Elasticsearch does this natively (kNN + BM25 rrf).
Check yourself — multiple choice
  • Random
  • TF × IDF with IDF = log(N/df); downweights common terms; foundation of BM25 + still core of hybrid BM25 + dense retrieval
  • Same as bag-of-words
  • Not real

TF-IDF: term × log(N/df)\operatorname{log}(N / \mathrm{df}); foundation of BM25 and hybrid retrieval.

#nlp#text

Practise Unsupervised Learning

214 interview questions in this topic.

Related questions