biaslab / ForneyLab.jl

Julia package for automatically generating Bayesian inference algorithms through message passing on Forney-style factor graphs.
MIT License
149 stars 33 forks source link

Fix probit average energy #171

Closed bartvanerp closed 3 years ago

bartvanerp commented 3 years ago

The average energy calculation for the probit node is incorrect, as well as the tests. This pull request fixes the issue.

The average energy for a standard normal distribution at the input of the probit node, should always return 1. A detailed explanation can be found at https://math.stackexchange.com/questions/2342234/does-the-expectation-of-the-log-of-a-gaussian-cumulative-distribution-function-w.

The average energy calculation has been updated, as well as the corresponding tests.