You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(kpi): say what P@1, MRR, r@6 and nDCG actually mean
The metrics table said what each number asks and why it is there, and never once
expanded the abbreviation or gave the formula. Every table in the report is headed
with them.
So: Precision at 1, Mean Reciprocal Rank, recall at 6, normalized Discounted
Cumulative Gain at 10 — each with what it computes per query, what the @k suffix
means, and a worked table of what all four give for a target landing at #1, #2, #3,
#4, #6, #7, #10, #11 and past #50. The table is generated from lib/harness.js rather
than from the textbook, because in one respect they differ.
That respect is worth stating plainly, since anyone who knows nDCG will assume
otherwise: OURS IS NOT CUMULATIVE. Textbook DCG sums the discounted gains of every
relevant hit inside the window; evaluate() takes the single best contribution
(Math.max). It is deliberate — `also` lists ALTERNATIVES, so the ideal ranking puts
one of them first rather than all of them, and summing would reward a ranker for
returning three spellings of the same answer. The note existed before the README was
rewritten and did not survive the rewrite; this puts it back next to the definition
instead of three sections away.
Also documents the two labels that appear in the tables with no explanation anywhere:
`lost` (the target never returned, or returned past rank 50 — the deep and
unreachable buckets summed) and micro versus macro. And names where each metric goes
blind, which the numbers alone do not show: r@6 falls off a cliff between #6 and #7,
nDCG@10 reaches zero after #10, and MRR@target stops counting at rank 50 because that
is the window evaluate() scores.
0 commit comments