Closed ismailsenoz closed 1 year ago
See also Distributions.jl https://github.com/JuliaStats/Distributions.jl/blob/master/src/univariate/discrete/poisson.jl#L68 and ReactiveMP.jl https://github.com/biaslab/ReactiveMP.jl/blob/master/src/nodes/poisson.jl#L28
There is another problem: the Poisson node calls the average energy function when the output is a point mass. However, the average energy function has the wrong logic in this case. https://github.com/biaslab/ReactiveMP.jl/blob/master/src/nodes/poisson.jl#L29 should be implemented in ForneyLab as well otherwise if Poisson is used at the likelihood with data it will return wrong free energy.
Thanks for the heads-up!
ForneyLab computes free energy wrong when there is a Poisson node with a large parameter value due to this function. We spotted it with @bvdmitri and thought of letting @ThijsvdLaar know.