# Apply a factor on each element of a jaggedArray

• ### Question

• Hello,

I want to follow this example to tell infer.NET that my variables come from a certain distribution. Like this example:

Variable.ConstrainEqualRandom(jaggedArray[xRAnge][yRange][zRange], observationDistribs[xRange][yRange][zRange]);

I have a jagged array. So I first define a jagged array (observationDistributions) of type Gaussian, and set its observedvalue to the array of proper Gaussians that I need. my jagged array is defined like this :

sum = Variable.sum(variableArray1 * VariableArray2);

jaggedArray[xRange][yRange][zRange] = Variable.GaussianFromMeanAndPrecision(sum , noise)

And noise itself is a variable with a broad Gamma prior. (The above lines are inside foreach block over three ranges)

I create my model and in running there is a problem :

GaussianProductOp.AAverageConditional(array_B[xRange][yRange][zRange], array_Rep2_F[xRange][zRange][yRange], inputData_1_zIndices_F[yRange][xRange][zRange]) has quality band Experimental which is  less than the recommended quality band (Preview) done.
An unhandled exception of type 'System.Exception' occurred in Infer.Runtime.dll

can anyone help me what can the problem be?

When instead of ConstrainEqualRandom I set observedValue to mean of this distribution it works (And it should not work in theory, because these values are not observed to this means, but they are a sample of the distribution with this noise). But it seems because the multiply itself is noisy, then introducing a noisy variable (instead of observed) is then a problem. Can you please help me? Am I thinking correctly?

• Edited by Wednesday, February 4, 2015 10:32 PM
Wednesday, February 4, 2015 10:00 PM