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