Why is the IDF formula on https://en.wikipedia.org/wiki/Okapi_BM25#The_ranking_f...

@barubary@infosec.exchange

Why is the IDF formula on en.wikipedia.org/wiki/Okapi_BM given as

IDF(q[i]) = ln((N - n(q[i]) + 0.5) / (n(q[i]) + 0.5) + 1)

instead of the more natural looking

IDF(q[i]) = ln((N + 1) / (n(q[i]) + 0.5))

?

And why do we add 1 to the numerator, but 0.5 to the denominator? (I know we add some quantity to avoid dividing by 0 and taking the log of 0, but why not add 1 to both as shown in en.wikipedia.org/wiki/Tf%E2%80?)

#idf #bm25