-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
accumulate_Hessian_times_input for Poisson...ProjData fails for input containing negatives #1461
Comments
value is computed as STIR/src/buildblock/recon_array_functions.cxx Lines 367 to 371 in 12bfa87
|
not really, see #1472 |
KrisThielemans
changed the title
accumulate_Hessian_times_input fails for input containing negatives
accumulate_Hessian_times_input for Poisson...ProjData fails for input containing negatives
Jul 22, 2024
KrisThielemans
added a commit
to KrisThielemans/STIR-1
that referenced
this issue
Jul 22, 2024
accumulate_sub_Hessian_times_input_without_penalty used divide_and_truncate, but this is incorrect as its threshold strategies are not appropriate for (measured * forward_input)/forward_current^2. Most obvious example is if forward_input contains negatives. We now use 0/x=0 (first thresholding measured data to be non-negative). UCL#1461
KrisThielemans
added a commit
to KrisThielemans/STIR-1
that referenced
this issue
Jul 22, 2024
The Hessian calculations use divide_and_truncate, which sets negative numerators to zero. This is incorrect when the forward projection of the "input" is negative. We now check this and throw an error if it occurs. A proper fix will have to be for later. See UCL#1461
KrisThielemans
added a commit
to KrisThielemans/STIR-1
that referenced
this issue
Jul 22, 2024
The Hessian calculations for the Poisson log-lik for projdata use divide_and_truncate, which sets negative numerators to zero. This is incorrect when the forward projection of the "input" contains negatives. We now check this and throw an error if it occurs. A proper fix will have to be for later. See UCL#1461
KrisThielemans
added a commit
to KrisThielemans/STIR-1
that referenced
this issue
Jul 22, 2024
The Hessian calculations for the Poisson log-lik for projdata use divide_and_truncate, which sets negative numerators to zero. This is incorrect when the forward projection of the "input" contains negatives. We now check this and throw an error if it occurs. A proper fix will have to be for later. See UCL#1461
#1477 raises an error in this case (it doesn't really fix it though) |
KrisThielemans
added a commit
to KrisThielemans/STIR-1
that referenced
this issue
Jul 25, 2024
accumulate_sub_Hessian_times_input_without_penalty used divide_and_truncate, but this is incorrect as its threshold strategies are not appropriate for (measured * forward_input)/forward_current^2. Most obvious example is if forward_input contains negatives. We now use 0/x=0 (first thresholding measured data to be non-negative). UCL#1461
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If input is filled with -1, the output is 0. This will be because we use
divide_and_truncate
(e.g. here). This function is designed to work for the PoissonLL operations, and truncates negatives to zero. That is incorrect for the multiplication with the Hessian though, as the "input" vector can be anything.Unfortunately, it doesn't seem to be easy to make the Hessian calculation consistent with the truncation strategy used for the gradient (and value) of the PoissonLL (or at least, do it without becoming quite slow).
The text was updated successfully, but these errors were encountered: