I was reading:
https://en.wikipedia.org/wiki/Tf%E2%80%93idf#Definition
But I cannot seem to understand exactly why the formula was constructed the way it is.
What I do Understand:
iDF should at some level measure how frequently a term S appears in each of the documents, decreasing in value as the term appears more frequently.
From that perspective
$$ iDF(S) = \frac{\# \text{ of Documents}}{\# \text{ of Documents containing S}}$$
Furthermore term frequency can be rightly described as
$$ tf(S,D) = \frac{\# \ \text{of Occurrences of S in document D}}{\# \ \text{maximum number of occurrences for any string Q in document D}} $$
So then the measure
$$ iDF(S) \times tf(S,D) $$
is in some way proportional to how frequently a term appears in a given document, and how unique that term is over the set of documents.
What I don't understand
But the formula given describes it as
$$ \left( \log(iDF(S)) \right) \left( \frac{1}{2} + \log(\frac{1}{2} tf(S,D)) \right) $$
I wish to understand the need for the logarithms described in the definition. Like, why are they there? What aspect do they emphasize?