Inverse document frequency (IDF)

Let's say we have N documents in our corpus, then the inverse document frequency is defined as:

Rare words tend to have high IDFs. If we look at the equation above and ignore the log function, IDF is the total number of documents divided by the number of documents that the word is in. In effect, it is measuring how good the word is at identifying this document. If the word is only used in a small number of documents, then the denominator will be low, therefore the overall value will be high. The log is just used to normalize the result.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset