INFER.NET factors - with non-Gaussian (beta) distributions<p>Hi everybody,</p>
<p>I have a graphical model in which there are variables which are not Gaussian. There are some factor nodes in the graph - like factor.Multiply , etc. When I run the inference, I just get an error since these variables are not Gaussian distributed.
</p>
<p>For example the small code below in not compiled:</p>
<pre class="prettyprint" style="">Variable<double> A = Variable.BetaFromMeanAndVariance(0.4, 0.3);
Variable<double> B = Variable.BetaFromMeanAndVariance(0.5,0.2);
Variable<double> C = A * B;
InferenceEngine engine = new InferenceEngine();
Console.WriteLine(engine.Infer<Beta>(C));</pre>
<p>Now the problem is that I cannot change the distribution to Gaussian in my model. I wanted to ask if I should just transfer to another tool (which I think there is no other tool implementing EP) or there is a way to handle this? These factors should work
on other distributions, I mean I didn't find anything in the documents saying they don't . I don't know what is the source of this error maybe.
<br/>
Thanks a lot for your help.</p>
<p></p>
<p>(this is the error message: </p>
<p><em>Error 0: This model is not supported with ExpectationPropagation due to Factor.Product(double product, double a, double b). Try using a different algorithm or expressing the model differently in</em><br/>
<em>Factor.Product(vdouble0_use, vdouble1_use)</em><br/>
<em>Details: [0] System.ArgumentException: Beta is not of type Gaussian for argument 1 of method GaussianProductOp.ProductAverageConditional(Gaussian Product = Beta, Gaussian A = Beta, Gaussian B = Beta)</em><em></em></p>
<p><em>[1] System.ArgumentException: Beta is not of type double for argument 1 of method GaussianProductOp.ProductAverageConditional(double A = Beta, Gaussian B = Beta)</em><br/>
<em>[2] System.ArgumentException: Beta is not of type Gaussian for argument 1 of method GaussianProductOp.ProductAverageConditional(Gaussian A = Beta, double B = Beta)</em><br/>
<em>[3] System.ArgumentException: Beta is not of type double for argument 1 of method GaussianProductOp.ProductAverageConditional(double a = Beta, double b = Beta)</em><br/>
<em>[4] System.ArgumentException: Beta is not of type Gaussian for argument 1 of method GaussianProductOp_SHG09.ProductAverageConditional(Gaussian A = Beta, Gaussian B = Beta, Gaussian to_A = Beta, Gaussian to_B = Beta)</em><em></em>).</p>
<p>I would appreciate any help. <br/>
<br/>
<br/>
</p>
<br/>
<br/>
<br/>
<br/>© 2009 Microsoft Corporation. All rights reserved.Tue, 09 Jan 2018 18:27:41 Zbe591c12-7dc8-4b61-a7ad-b4f50c92e440- https://social.microsoft.com/Forums/ja-JP/be591c12-7dc8-4b61-a7ad-b4f50c92e440/infernet-factors-with-nongaussian-beta-distributions?forum=infer.net#be591c12-7dc8-4b61-a7ad-b4f50c92e440https://social.microsoft.com/Forums/ja-JP/be591c12-7dc8-4b61-a7ad-b4f50c92e440/infernet-factors-with-nongaussian-beta-distributions?forum=infer.net#be591c12-7dc8-4b61-a7ad-b4f50c92e440RazinRhttps://social.microsoft.com:443/profile/razinr/?type=forumINFER.NET factors - with non-Gaussian (beta) distributions<p>Hi everybody,</p>
<p>I have a graphical model in which there are variables which are not Gaussian. There are some factor nodes in the graph - like factor.Multiply , etc. When I run the inference, I just get an error since these variables are not Gaussian distributed.
</p>
<p>For example the small code below in not compiled:</p>
<pre class="prettyprint" style="">Variable<double> A = Variable.BetaFromMeanAndVariance(0.4, 0.3);
Variable<double> B = Variable.BetaFromMeanAndVariance(0.5,0.2);
Variable<double> C = A * B;
InferenceEngine engine = new InferenceEngine();
Console.WriteLine(engine.Infer<Beta>(C));</pre>
<p>Now the problem is that I cannot change the distribution to Gaussian in my model. I wanted to ask if I should just transfer to another tool (which I think there is no other tool implementing EP) or there is a way to handle this? These factors should work
on other distributions, I mean I didn't find anything in the documents saying they don't . I don't know what is the source of this error maybe.
<br/>
Thanks a lot for your help.</p>
<p></p>
<p>(this is the error message: </p>
<p><em>Error 0: This model is not supported with ExpectationPropagation due to Factor.Product(double product, double a, double b). Try using a different algorithm or expressing the model differently in</em><br/>
<em>Factor.Product(vdouble0_use, vdouble1_use)</em><br/>
<em>Details: [0] System.ArgumentException: Beta is not of type Gaussian for argument 1 of method GaussianProductOp.ProductAverageConditional(Gaussian Product = Beta, Gaussian A = Beta, Gaussian B = Beta)</em><em></em></p>
<p><em>[1] System.ArgumentException: Beta is not of type double for argument 1 of method GaussianProductOp.ProductAverageConditional(double A = Beta, Gaussian B = Beta)</em><br/>
<em>[2] System.ArgumentException: Beta is not of type Gaussian for argument 1 of method GaussianProductOp.ProductAverageConditional(Gaussian A = Beta, double B = Beta)</em><br/>
<em>[3] System.ArgumentException: Beta is not of type double for argument 1 of method GaussianProductOp.ProductAverageConditional(double a = Beta, double b = Beta)</em><br/>
<em>[4] System.ArgumentException: Beta is not of type Gaussian for argument 1 of method GaussianProductOp_SHG09.ProductAverageConditional(Gaussian A = Beta, Gaussian B = Beta, Gaussian to_A = Beta, Gaussian to_B = Beta)</em><em></em>).</p>
<p>I would appreciate any help. <br/>
<br/>
<br/>
</p>
<br/>
<br/>
<br/>
<br/>Tue, 10 Jun 2014 15:39:15 Z2014-06-10T15:39:15Z
- https://social.microsoft.com/Forums/ja-JP/be591c12-7dc8-4b61-a7ad-b4f50c92e440/infernet-factors-with-nongaussian-beta-distributions?forum=infer.net#a3c1c106-d0d4-4608-b504-428537bc4dafhttps://social.microsoft.com/Forums/ja-JP/be591c12-7dc8-4b61-a7ad-b4f50c92e440/infernet-factors-with-nongaussian-beta-distributions?forum=infer.net#a3c1c106-d0d4-4608-b504-428537bc4dafTom Minkahttps://social.microsoft.com:443/profile/tom%20minka/?type=forumINFER.NET factors - with non-Gaussian (beta) distributionsInfer.NET doesn't support multiplication of Beta-distributed variables at the moment. So you will have to use another tool for this type of model.Thu, 12 Jun 2014 13:53:15 Z2014-06-12T13:53:15Z
- https://social.microsoft.com/Forums/ja-JP/be591c12-7dc8-4b61-a7ad-b4f50c92e440/infernet-factors-with-nongaussian-beta-distributions?forum=infer.net#5d78707b-e78d-49d4-be4a-6445ccef9f90https://social.microsoft.com/Forums/ja-JP/be591c12-7dc8-4b61-a7ad-b4f50c92e440/infernet-factors-with-nongaussian-beta-distributions?forum=infer.net#5d78707b-e78d-49d4-be4a-6445ccef9f90RazinRhttps://social.microsoft.com:443/profile/razinr/?type=forumINFER.NET factors - with non-Gaussian (beta) distributionsThanks a lot for your reply.<br/>Fri, 13 Jun 2014 08:04:27 Z2014-06-13T08:04:27Z