MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / dcg

Function dcg

experiments/human_eval/build_main_human_eval_packet.py:150–151  ·  view source on GitHub ↗
(gains: Iterable[float])

Source from the content-addressed store, hash-verified

148
149
150def dcg(gains: Iterable[float]) -> float:
151 return sum(gain / math.log2(index + 2) for index, gain in enumerate(gains))
152
153
154def mrr_from_labels(labels: Sequence[str], limit: int = 20) -> float:

Callers 1

compute_episode_metricsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected