What is TF IDF?
What is TF IDF?
645
30-Nov-2020
Updated on 19-Feb-2026
Anubhav Sharma
19-Feb-2026TF-IDF stands for Term Frequency – Inverse Document Frequency. It is a numerical method used in AI, NLP, and search engines to measure how important a word is in a document compared to a collection of documents.
1. Simple Meaning
TF-IDF helps answer:
“Which words are really important in this text?”
Because:
2. Two Parts of TF-IDF
A. Term Frequency (TF)
Measures how often a word appears in a document.
Formula:
Example:
If "AI" appears 5 times in a document of 100 words:
TF = 5 / 100 = 0.05
B. Inverse Document Frequency (IDF)
Measures how rare the word is across all documents.
Formula:
3. Final TF-IDF Formula
So a word gets a high score only when:
4. Easy Example
Imagine 3 documents:
Word: "AI"
Word: "future"
5. Why TF-IDF is Important in AI
Used in:
6. Quick Intuition Rule
7. TF-IDF in One Line
TF-IDF tells how important a word is in a document compared to all other documents.
If you want, I can also explain:
Anshu Dwivedi
30-Nov-2020Tf-idf stands for term frequency-inverse document frequency, and the tf-idf weight is a weight often used in information retrieval and text mining. This weight is a statistical measure used to evaluate how important a word is to a document in a collection or corpus.