I feel that the problem is solvable, but I cannot make the inference work.
var count = 5;
var trueValues = new double[] { 1, 2, 3, 4, 5 };
var distributions = Enumerable.Range(0, count).Select(i => Variable.GaussianFromMeanAndVariance(Variable.GaussianFromMeanAndVariance(0, 100), Variable.GammaFromShapeAndScale(1, 1)).Named("v_" + i)).ToArray();
for (int i = 0; i < count; i++) {
for (int j = i + 1; j < count; j++) {
(Variable.GaussianFromMeanAndVariance(distributions[i] * distributions[j], Variable.GammaFromShapeAndScale(1, 1))).ObservedValue = trueValues[i] * trueValues[j];
}
}
var engine1 = new InferenceEngine();
for (int i = 0; i < count; i++) {
Console.WriteLine(engine1.Infer(distributions[i]));
}