
Term frequency-inverse document frequency (TF-IDF)
Term frequency-inverse document frequency (TF-IDF) is a statistical measure used to evaluate how important a word is to a document in a collection or corpus. It works in two parts: "term frequency" measures how often a word appears in a specific document, while "inverse document frequency" assesses how common or rare that word is across all documents. By combining these, TF-IDF helps identify words that are unique or relevant to a particular document, making it useful for tasks like search engines, where distinguishing significant terms can enhance the relevance of results.