X-Git-Url: https://git.sesse.net/?p=wloh;a=blobdiff_plain;f=train.pl;h=67b2b8d737e49f0dbde6f004923cc8f6af7b5c83;hp=22a2741ccb8b12a71a81d1d9c065461cc4f00dd3;hb=72a2eedd021d38d6bb0786033c6f100062363789;hpb=dca2f8f927ae7bbe19e89d3d367992bf5f9ae294 diff --git a/train.pl b/train.pl index 22a2741..67b2b8d 100755 --- a/train.pl +++ b/train.pl @@ -56,13 +56,13 @@ while (my $ref = $q->fetchrow_hashref) { close DATA; $dbh->do('DELETE FROM ratings'); -my $iq = $dbh->prepare('INSERT INTO ratings ( id, rating ) VALUES (?, ?)'); +my $iq = $dbh->prepare('INSERT INTO ratings ( id, rating, rating_stddev ) VALUES (?, ?, ?)'); open RATINGS, "$config::base_dir/bayeswf < $tmpnam |" or die "bayeswf: $!"; while () { - /(.*) (.*)/ or next; - $iq->execute($2, $1); + /(.*) (.*) (.*)/ or next; + $iq->execute($3, $1, $2); } $dbh->commit;