Good evening hackage developers, please consider merging this patch to hackage-server. The rationale (and the patch itself) is very simple: to point to the more precise (and more clear) documentation for the chosen estimator. Thanks -F
>From cb72114971dbe0e63cd267076178e2ca62c6cfda Mon Sep 17 00:00:00 2001 From: Francesco Ariis <fa...@ariis.it> Date: Sat, 19 Jan 2019 17:48:24 +0100 Subject: [PATCH] Fix estimator explanation
--- Distribution/Server/Features/Votes/State.hs | 2 +- datafiles/templates/Html/package-page.html.st | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Distribution/Server/Features/Votes/State.hs b/Distribution/Server/Features/Votes/State.hs index a493dfe..aa72e6d 100644 --- a/Distribution/Server/Features/Votes/State.hs +++ b/Distribution/Server/Features/Votes/State.hs @@ -58,7 +58,7 @@ userVotedForPackage pkgname uid votes = Nothing -> False Just _ -> True --- Using Laplace's rule of succession to calculate scoring +-- Using a Bayesian average (m=1.5, C=2) to calculate scoring votesScore :: Map UserId Score -> Float votesScore m = let grouping = map (head &&& length) . group . sort . Map.elems $ m diff --git a/datafiles/templates/Html/package-page.html.st b/datafiles/templates/Html/package-page.html.st index 28fb2c4..c8771c9 100644 --- a/datafiles/templates/Html/package-page.html.st +++ b/datafiles/templates/Html/package-page.html.st @@ -163,7 +163,7 @@ <tr> <th> Rating</th> <td>$if(hasVotes)$$score$ (votes: $votes$)$else$(no votes yet)$endif$ - <span style="font-size: small">[estimated by <a href="https://en.wikipedia.org/wiki/Rule_of_succession">rule of succession</a>]</span></td> + <span style="font-size: small">[estimated by <a href="https://en.wikipedia.org/wiki/Bayesian_average">Bayesian average</a>]</span></td> </tr> <tr> -- 2.11.0
_______________________________________________ cabal-devel mailing list cabal-devel@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel