Explain TF-IDF (Term Frequency-Inverse Document Frequency) with example
Term Weighting (TF-IDF)
The term weighting refers to the process of calculating and assigning the weight of each word as its importance degree. We may need the process for removing words further as well as stop words for further efficiency. The term frequency and the TF-IDF weight are the popular schemes of weighting words, so they will be described formally, showing their mathematical equations. The term weights may be used as attribute values in encoding texts into numerical vectors.
We may use the term frequency which is the occurrence of each word in the given text as the scheme of weighting words. It is assumed that the stop words which occur most frequently in texts are completely removed in advance. The words are weighted by counting their occurrences in the given text in this scheme. There are two kinds of term frequency: the absolute term frequency as the occurrence of words and the relative term frequency as the ratio of their occurrences to the maximal ones. The relative term frequency is preferred to the absolute one, in order to avoid the overestimation and underestimation by the text lengths.
TF-IDF (Term Frequency-Inverse Document Frequency) is the most popular scheme of weighting words in the area of information retrieval but requires references to the entire text collection which is called corpus. The word weights that are computed by the TF-IDF scheme are proportional to the occurrences in the given text but reversely proportional to that in other texts.
Comments
Post a Comment