X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=train.pl;h=22a2741ccb8b12a71a81d1d9c065461cc4f00dd3;hb=1e27ce64b3bd8574c621f1b7d47f94593d99318b;hp=4981e44477fa9dc504184a2ba2774d168ac3e1a7;hpb=5daac690d3670f846dd8b7527074e2d9e5208920;p=wloh diff --git a/train.pl b/train.pl index 4981e44..22a2741 100755 --- a/train.pl +++ b/train.pl @@ -47,6 +47,9 @@ WHERE deltager1.Nr > deltager2.nr $q->execute($last_season); while (my $ref = $q->fetchrow_hashref) { + next if ($ref->{'maalfor'} == 150 && $ref->{'maalmot'} == 0); + next if ($ref->{'maalfor'} == 0 && $ref->{'maalmot'} == 150); + next if ($ref->{'maalfor'} == 150 && $ref->{'maalmot'} == 150); printf DATA "%d %d %d %d %f\n", $ref->{'p1'}, $ref->{'p2'}, $ref->{'maalfor'}, $ref->{'maalmot'}, $ref->{'vekt'}; } @@ -55,7 +58,7 @@ close DATA; $dbh->do('DELETE FROM ratings'); my $iq = $dbh->prepare('INSERT INTO ratings ( id, rating ) VALUES (?, ?)'); -open RATINGS, "/home/sesse/dev/bayeswf/bayeswf < $tmpnam |" +open RATINGS, "$config::base_dir/bayeswf < $tmpnam |" or die "bayeswf: $!"; while () { /(.*) (.*)/ or next; @@ -63,3 +66,4 @@ while () { } $dbh->commit; +unlink($tmpnam);