Skip to content

Commit

Permalink
README: shorten custom formulas
Browse files Browse the repository at this point in the history
  • Loading branch information
woctezuma authored Apr 3, 2024
1 parent 0c8b570 commit bcd4400
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,30 @@ Results are shown in the Wiki for:
- Using **average values** obtained on September 3, 2023 for the **prior**:

```js
const C = 1117 ;
const m = 0.756 ;
return (C * m + game.positiveVotes) / (C + game.votes) ;
const C = 1117 ; // prior: avg #reviews
const m = 0.756 ; // prior: avg score
const n = game.votes ;
return (C*m+game.positiveVotes) / (C+n) ;
```

- Using **median values** obtained on September 3, 2023 for the **prior**:

```js
const C = 17 ;
const m = 0.822 ;
return (C * m + game.positiveVotes) / (C + game.votes) ;
const C = 17 ; // prior: med #reviews
const m = 0.822 ; // prior: med score
const n = game.votes ;
return (C*m+game.positiveVotes) / (C+n) ;
```

- For comparison, **replicating** SteamDB's formula, which does not use Bayesian average::

```js
const C = 1 ;
const m = 0.50 ;
const p = game.positiveVotes / game.votes ;
const alpha = (C + game.votes) ** Math.log10(m) ;
return alpha*m + (1-alpha)*p ;
const C = 1 ; // offset for #reviews
const m = 0.50 ; // middle point for score
const n = game.votes ;
const p = game.positiveVotes / n ;
const t = (C+n) ** Math.log10(m) ;
return t*m + (1-t)*p ;
```

## Appendix: data
Expand Down

0 comments on commit bcd4400

Please sign in to comment.