X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=recalc-single-result.pl;fp=recalc-single-result.pl;h=b6f8b779db39b233eff5e6054326a1c964978778;hb=2267ce0f1f55deb019db7d2634c4ff9c62e4988d;hp=efcd4c73891ef5a8af3aec31a168596261180bf0;hpb=77c87920bd53f36c10512c824e1c39768182ba43;p=foosball diff --git a/recalc-single-result.pl b/recalc-single-result.pl index efcd4c7..b6f8b77 100755 --- a/recalc-single-result.pl +++ b/recalc-single-result.pl @@ -5,6 +5,7 @@ use DBI; use CGI; use CGI::Carp qw(fatalsToBrowser); require 'foosball.pm'; +use foosrank; no warnings 'once'; my $dryrun = 0; @@ -47,8 +48,8 @@ while (my $ref = $q->fetchrow_hashref) { $rd1 = foosball::apply_aging($rd1, $age1 / 86400.0); $rd2 = foosball::apply_aging($rd2, $age2 / 86400.0); - my ($newr1, $newrd1, $likelihood) = foosball::calc_rating($rating1, $rd1, $rating2, $rd2, $score1, $score2); - my ($newr2, $newrd2) = foosball::calc_rating($rating2, $rd2, $rating1, $rd1, $score2, $score1); + my ($newr1, $newrd1, $likelihood) = foosrank::compute_new_rating($rating1, $rd1, $rating2, $rd2, $score1, $score2); + my ($newr2, $newrd2) = foosrank::compute_new_rating($rating2, $rd2, $rating1, $rd1, $score2, $score1); $cll += log($likelihood);