From 7fe14c46a02af3b551a724649ba00099bc56ac80 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sat, 13 Mar 2010 18:07:47 +0100 Subject: [PATCH] bayes.pl: Calculate MSE on original style scores --- bayes.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bayes.pl b/bayes.pl index 5c9dc38..31d0dae 100755 --- a/bayes.pl +++ b/bayes.pl @@ -64,8 +64,8 @@ foreach my $fold (@folds) { my @sp = sort {$p->{$b} <=> $p->{$a}} keys %$p; my $top = $sp[0]; $top =~ s/div=//; # my $top = rand($deg); - for comparing with random classifier - # rescale to [-1,1] and calculate squared error - my $se = (($output{$pl} - $top) * 2 / $deg) ** 2; + # calculate squared error wrt. the original [1,10] scale + my $se = (($output{$pl} - $top) * (10 / $deg)) ** 2; $mse += $se; #print join ',', $pl, $se, $output{$pl}, $top, $p->{'div='.$top}, "\n"; } -- 2.11.4.GIT