The log likelihood functions first calculate the likelihood and then take the log numerically.
The formulas look like the log-likelihood could be written down directly.
[X] ctapipe.image.muon.intensity_fitter
[ ] ctapipe.image.pixel_likelihood used by ImPACT
The docstring of the pixel_likelihood module states:
The likelihood is essentially a poissonian convolved with a gaussian, at low signal
a full possonian approach must be adopted, which requires the sum of contibutions
over a number of potential contributing photoelectrons (which is slow and can fail
at high signals due to the factorial which mst be calculated).
This is wrong! First, one can simplify the log-likelihood analytically instead of naively calculating first exp and then log of partial terms.
Second, the factorial is not needed at all as it is constant under differentiation with respect to the parameters, so can be discarded completely.
The log likelihood functions first calculate the likelihood and then take the log numerically.
The formulas look like the log-likelihood could be written down directly.
ctapipe.image.muon.intensity_fitter
[ ]
ctapipe.image.pixel_likelihood
used by ImPACTThe docstring of the
pixel_likelihood
module states:This is wrong! First, one can simplify the log-likelihood analytically instead of naively calculating first
exp
and thenlog
of partial terms.Second, the factorial is not needed at all as it is constant under differentiation with respect to the parameters, so can be discarded completely.