Skip to content

Commit

Permalink
date entropy bugfix
Browse files Browse the repository at this point in the history
need to multiply space size by 31 (possible days) and 12 (possible
months)
  • Loading branch information
lowe committed Sep 5, 2015
1 parent 45c6530 commit 236d47f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scoring.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ scoring =
@lg Math.abs year_space

date_entropy: (match) ->
# base entropy: lg of year distance from 2000
entropy = @lg Math.abs(match.year - 2000)
# base entropy: lg of (year distance from 2000 * num_days * num_years)
entropy = @lg(Math.abs(match.year - 2000) * 31 * 12)
# add one bit for four-digit years
entropy += 1 if match.has_full_year
# add two bits for separator selection (one of ~4 choices)
Expand Down

0 comments on commit 236d47f

Please sign in to comment.