Experiment $run\n";
}
else {
$diff = compute_diff($display[0],$run);
}
print "
";
output_score($run,$experiment[$run]);
print "
";
}
}
function compute_diff($base,$change) {
print "Experiment $change
";
// get parameter values for the two runs
$parameter_base = load_parameter($base);
$parameter_change = load_parameter($change);
// get parameters and sort them
$all_parameters = array_keys($parameter_base);
foreach (array_keys($parameter_change) as $parameter) {
if (!array_key_exists($parameter,$parameter_base)) {
$all_parameters[] = $parameter;
}
}
sort($all_parameters);
// display differences
foreach ($all_parameters as $parameter) {
if (!array_key_exists($parameter,$parameter_base)) {
$parameter_base[$parameter] = "";
}
if (!array_key_exists($parameter,$parameter_change)) {
$parameter_change[$parameter] = "";
}
if ($parameter_base[$parameter] != $parameter_change[$parameter]) {
output_diff_line($parameter,$parameter_base[$parameter],$parameter_change[$parameter]);
}
}
print "
\n";
}
function output_diff_line($parameter,$base_value,$change_value) {
print "$parameter | $change_value |
| $base_value |
\n";
}