Skip to main content
← Lab

entropydiv

confirmedupstream bugPython · RecBoleInference & servingJuly 24, 2026

the question

Does RecBole's ShannonEntropy metric report diversity monotonically with recommendation diversity?

what came out

RecBole's ShannonEntropy divides Shannon entropy H by the number of distinct items S, a divisor absent from its documented formula and not Pielou's log(S). Since log(S)/S falls past e, the metric inverts: uniform over 50/500/5000 items scores 0.078/0.012/0.0017 while true diversity rises.

method & receipts

  • Result: confirmed
  • Reproducible one script re-runs the whole thing from scratch.
  • Tested — a correctness/benchmark suite ships alongside the code.

→ read the code and re-run it

github.com/v-code01/entropydiv