Infer.NET 101 Chapter 7 - Model Comparison


  • So I have followed pretty much chapters 1 - 6 but I don't understand how a simple

    Evidence = Variable.Bernoulli(0.5);
    using (Variable.If(Evidence))

    Is all that you need in the model to calculate evidence.  How does that C# capture my intension to calculate the evidence in such a simple statement.  Thanks. 

    16. ledna 2012 0:07

Všechny reakce

  • It works because the call to Variable.If sets a global flag so that when base.CreateModel executes, it knows that the model is inside of a Variable.If(Evidence) block.
    16. ledna 2012 14:20