Answered by:
A Basic Case (Migrated from community.research.microsoft.com)
Question

Ali Yaghoubi posted on 03172011 6:56 AM
Hi Dear John,
Would you mind illustrating that what happens through these statements in a deterministic way ?
It's important to me to keep track of the step by step process.
VariableArray<double> data = Variable.Observed(new double[] { 11, 5, 8, 9 });
Range i = data.Range;
data[i] = Variable.GaussianFromMeanAndPrecision(mean, precision).ForEach(i);I was wondering if you could use any image or graph for this.
Thanks,
Friday, June 3, 2011 6:38 PM
Answers

John Guiver replied on 03222011 5:44 AM
Hi Ali
I am assuming that when you say 'inputs', you mean 'data'.
You have some data which is assumed to have been generated independently from a single Gaussian distribution whose parameters (mean and precision) are random variables. The generative process is as follows: a mean is sampled from the 'mean' random variable (a Gaussian), and a precision is sampled from the 'precision' random variable; then each data point is generated from a Gaussian with that mean and variance. This is different from what you state. In the factor graph representation, the mean and precision random variables are outside the data plate.
The aim is to learn the posterior marginal distributions of 'mean' and 'precision'.
John
 Marked as answer by Microsoft Research Friday, June 3, 2011 6:39 PM
Friday, June 3, 2011 6:38 PM
All replies

John Guiver replied on 03212011 5:01 AM
Hi Ali
Chris Bishop's book section 10.1.3 'The univariate Gaussian' (pages 470 to 473 in my edition) gives a good description of what is going on here when using Varaitional Message passing (Expectation propagation is similar but a different approximation). Let me know if this is the type of explanation you were looking for.
John
Friday, June 3, 2011 6:38 PM 
Ali Yaghoubi replied on 03212011 2:51 PM
Hi John,
In fact each of the inputs comes from a Gaussian distribution that is different from the other input's Gaussian distribution and you want to find
the two overall distributions for mean and precision individually which each value of the mean distribution and each value of the precision
distribution can constitute one of the distributions for each input. I hope my intuition would be right.
Thanks
Friday, June 3, 2011 6:38 PM 
John Guiver replied on 03222011 5:44 AM
Hi Ali
I am assuming that when you say 'inputs', you mean 'data'.
You have some data which is assumed to have been generated independently from a single Gaussian distribution whose parameters (mean and precision) are random variables. The generative process is as follows: a mean is sampled from the 'mean' random variable (a Gaussian), and a precision is sampled from the 'precision' random variable; then each data point is generated from a Gaussian with that mean and variance. This is different from what you state. In the factor graph representation, the mean and precision random variables are outside the data plate.
The aim is to learn the posterior marginal distributions of 'mean' and 'precision'.
John
 Marked as answer by Microsoft Research Friday, June 3, 2011 6:39 PM
Friday, June 3, 2011 6:38 PM