Question 1.

in https://social.microsoft.com/Forums/en-US/daa215eb-3a08-44c1-b1d7-f7433193af4b/new-distributions-migrated-from-communityresearchmicrosoftcom?forum=infer.net

It is said that to get a variable of lognormal distribution, we do

Variable<double> y = Variable.Exp(Variable.GaussianFromMeanAndVariance(0,1)); // y's prior is log-normal

However, actually in the code it produces a Gamma distribution instead. (the message outgoing from factor exp is Gamma). So I guess we don't use LogNormal because
Gamma is used more often elsewhere and approximates lognormal well?

Question 2.

If I want to make a custom factor f(x, y), and when I observe y to be, say 0, the message outgoing to x, g(x) = f(x, 0) should be approximated to be Gaussian.

In EP, should I

A. approximate g(x) to be Gaussian directly, by some method.

B. take the incoming message from x to f, say h(x) which is supposed to be Gaussian. Then approximate h(x)g(x) to be Gaussian, by some method. Note this is the marginal distribution of x. So we can remove the h(x) part to get the outgoing message in a Gaussian
form.

So which of A and B is more appropriate?

Question 3.

In the above question, when I do the approximate, in EP, do I have to use Quadrature methods as in the source code, or I can use whatever method I like, e.g. Laplace approximation