Image for TF-IDF (Term Frequency-Inverse Document Frequency)

TF-IDF (Term Frequency-Inverse Document Frequency)

TF-IDF (Term Frequency-Inverse Document Frequency) is a method used to identify important words in a set of documents. It measures how often a word appears in a specific document (term frequency) and adjusts for how common that word is across all documents (inverse document frequency). Words that are frequently used in one document but rare across all documents get higher scores, indicating they are more relevant to that particular document. This helps in tasks like search engines or text analysis to find the most meaningful words that distinguish one document from others.