Skip to content

Commit

Permalink
sse: Fix bad calculation of relative absolute bias in
Browse files Browse the repository at this point in the history
  • Loading branch information
rikardn committed Aug 22, 2024
1 parent 4772f76 commit 76cc918
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions development/release_notes/release_notes_PsN_next_version.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ Changes and bug fixes from PsN 5.4.0 to x.x.x
* Handle missing_data_token properly when it is not -99

___scm___


___sse___

* Calculation of relative absolute bias was wrong. Now it does abs((est-true)/true)
before it did (est-true)/abs(true)
2 changes: 1 addition & 1 deletion doc/sse_userguide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ \subsection{Explanation for data items in sse\_results.csv:}
relative\verb|_|bias = 100\% \frac{1}{N} \sum_i \frac{est_i - true_i}{true_i}
\]
\[
relative\verb|_|absolute\verb|_|bias = 100\% \frac{1}{N} \sum_i \frac{est_i - true_i}{|true_i|}
relative\verb|_|absolute\verb|_|bias = 100\% \frac{1}{N} \sum_i \left|\frac{est_i - true_i}{true_i}\right|
\]
\[
Rse_{bias} = relativestandarderror = 100\% \frac{sd}{True \sqrt{N}}
Expand Down
3 changes: 1 addition & 2 deletions lib/tool/sse.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2316,8 +2316,7 @@ sub compute_bias
$sum_relative_errors +=
($self->raw_results->[$i][$column_index] - $initial_values[$i-$start_row_index])/($initial_values[$i-$start_row_index]);
$sum_relative_absolute_errors +=
($self->raw_results->[$i][$column_index] - $initial_values[$i-$start_row_index])/abs($initial_values[$i-$start_row_index]);
#possibly change to abs in numerator for relative_absolute
abs(($self->raw_results->[$i][$column_index] - $initial_values[$i-$start_row_index]) / $initial_values[$i-$start_row_index]);
}
}
}
Expand Down

0 comments on commit 76cc918

Please sign in to comment.