summaryrefslogtreecommitdiff
path: root/lib/Kratos
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-05-30 15:58:32 +0200
committerDaniel Friesel <derf@finalrewind.org>2017-05-30 15:58:32 +0200
commit6b45e9720286d21aee1de6e381d9200002812491 (patch)
treeb6293ee750b6198c593d33dffee2df7823947f89 /lib/Kratos
parentd2057ddd183163973613a6ce0be01fb656cc799d (diff)
calculate Spearman rank-order correlation coefficient
Diffstat (limited to 'lib/Kratos')
-rw-r--r--lib/Kratos/DFADriver.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Kratos/DFADriver.pm b/lib/Kratos/DFADriver.pm
index f238ba4..ade6067 100644
--- a/lib/Kratos/DFADriver.pm
+++ b/lib/Kratos/DFADriver.pm
@@ -342,6 +342,7 @@ sub printf_parameterized {
my $std_by_arg = $hash->{std_by_arg} // {};
my $std_by_param = $hash->{std_by_param};
my $std_by_trace = $hash->{std_by_trace} // {};
+ my $r_by_param = $hash->{spearmanr_by_param} // {};
my $arg_ratio;
my $param_ratio;
my $trace_ratio;
@@ -423,6 +424,10 @@ sub printf_parameterized {
$key, $status, $param, $std_ind_param, $std_this, $ratio,
$fline );
}
+ if (exists $r_by_param->{$param}) {
+ printf(" %s: spearman_r for global %s is %.3f (p = %.3f)\n",
+ $key, $param, $r_by_param->{$param}, -1);
+ }
}
for my $arg ( sort keys %{$std_by_arg} ) {