]> git.sesse.net Git - wloh/blobdiff - www/rating.pl
Add a friendly header to the scenario analysis.
[wloh] / www / rating.pl
index 8c6026280a3de02ebfd0d8e02ed3d6e9f11f6f02..d1ba9450a00255dcf5a1d1d3f89e1f561d3470eb 100755 (executable)
@@ -11,6 +11,7 @@ use HTML::Entities;
 use utf8;
 use locale;
 require '../config.pm';
+require '../common.pm';
 
 my $dbh = DBI->connect($config::local_connstr, $config::local_username, $config::local_password)
        or die "connect: " . $DBI::errstr;
@@ -32,7 +33,11 @@ print CGI->header(-type=>'text/html; charset=utf-8', -expires=>'+5m');
 POSIX::setlocale(&POSIX::LC_ALL, 'nb_NO.UTF-8');
 
 printf <<"EOF", $params{-3}, $match_stddev;
-<html>
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE
+  html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="no">
   <head>
     <title>WLoH-rating</title>
     <link rel="stylesheet" href="/style" type="text/css" />
@@ -61,7 +66,7 @@ printf <<"EOF", $params{-3}, $match_stddev;
 
     <ul>
       <li>MLE-basert modell med én skalar (styrke) per spiller og to globale skalarer (begge standardavvik, se under), løst med syklisk MM (minorization-maximization). Antall iterasjoner før konvergens: $params{-1}.</li>
-      <li>Rimelighetfunksjon, prior: Normalfordeling med µ=1500, &sigma;=%.1f (est.)</li>
+      <li>Rimelighetfunksjon, prior: Normalfordeling med µ=500, &sigma;=%.1f (est.)</li>
       <li>Rimelighetfunksjon, per kamp: Normalfordeling med µ=(score1 - score2), &sigma;=%.1f (est.)</li>
       <li>Vekting: Inneværende sesong samt de tre siste vektes fullt ut
        (likt med prior). Deretter eksponentielt synkende vekting, med
@@ -132,9 +137,11 @@ while (my $ref = $q->fetchrow_hashref) {
        printf "      <td><a href=\"http://wordfeud.aasmul.net/serie-%d\">%s</a></td>\n", $ref->{'serie_id'}, $ref->{'serie_navn'};
        print "    </tr>\n";
 }
+print "    </table>\n";
+
+wloh_common::output_last_sync($dbh);
 
 print <<"EOF";
-    </table>
   </body>
 </html>
 EOF