gschramm / parallelproj

code for parallel TOF and NONTOF projections
MIT License
27 stars 8 forks source link

Issue regarding the negative Poisson log-likelihood function using sinogram data and list-mode data #81

Closed zjutk closed 1 month ago

zjutk commented 1 month ago

Dear Professor Georg Schramm,

Thank you very much for your previous response regarding my question about the log-likelihood function! Based on my understanding of your reply, the Ote version of the list-mode negative Poisson log-likelihood function can be rewritten as:

$logL = \sum_i \bar{y_i}(x) - y_i \log( \bar{y_i}(x)) $

However, I noticed that this form is consistent with the negative Poisson log-likelihood function using sinogram data mentioned in this example(https://parallelproj.readthedocs.io/en/stable/auto_examples/05_algorithms/01_run_mlem_basic.html#sphx-glr-auto-examples-05-algorithms-01-run-mlem-basic-py), but differs from the list-mode negative Poisson log-likelihood function described here(https://parallelproj.readthedocs.io/en/stable/auto_examples/06_listmode_algorithms/01_listmode_mlem.html#sphx-glr-auto-examples-06-listmode-algorithms-01-listmode-mlem-py):

$logL = \sum_i \bar{y}_i (x) - \bar{y}_i (x) \log(y_i)$

Could you please clarify whether these two formulas are equivalent? If not, which one is the correct list-mode negative Poisson log-likelihood function?

Thank you again for your assistance.

Sincerely, Kun Tian

gschramm commented 1 month ago

Sorry for the confusion, what is called "logL" above is the negative Poisson log likelihood. We sometimes use that because in optmization, many people prefer to minimize vs maximize.

$$-logL = \sum_i \bar{y_i} - y_i \log \bar{y_i} $$

The Poisson logL is indeed (easy to check yourself):

$$ logL = \sum_i y_i \log \bar{y_i} - \bar{y_i} $$

zjutk commented 1 month ago

Thanks for your reply! However, my main question is: in the list-mode negative Poisson log-likelihood function, should it be $(\bar{y}_i (x) \log(y_i))$ or $(y_i \log \bar{y}_i(x))$?

gschramm commented 1 month ago

the second

$$ logL = \sum_i y_i \log \bar{y_i} - \bar{y_i}$$

easy to see if you know the Poisson distribution:

$$ \frac{\exp(-\bar{y_i}) \bar{y_i}^{y_i}}{y_i !} $$

and ignore terms that do not depend on $\bar{y_i}$

zjutk commented 1 month ago

Thank you very much for your response. You provided a perfect answer to my question. Have a great weekend!