Differentiate term frequency from inverse document frequency matrix.
In term frequency matrix, it finds out the relevance of words present in a document. It assumes the more frequently the word appears in a document, the more relevant is the word in the context. It works on the formula given below
TF = 1 + log (TF) if TF > 0
Where TF is the term frequency.
On the other hand, inverse document matrix assumes that words appear less in a document are more informative. It works on the formula given below
IDF = log (N/DF)
where N -the number of documents and
DF -the number of documents in which the word occurs.