Author Topic: Assigning a Normal Distribution to a Continuous Node  (Read 12843 times)

Offline nedosa

  • Newbie
  • *
  • Posts: 5
    • View Profile
Assigning a Normal Distribution to a Continuous Node
« on: July 08, 2008, 19:16:42 »
Hi,

What is the C++ API to assign the mean and variance to a continuous node? For a discrete node, one can use the setState and friends calls to set state values.

But if I have a node with no parents and want to assign a normal distribution to it, I can't find a way to do it. I thought the getDistribution call would do it, but then the Table class only returns the mean/variance and has no way to set them.

Many Thanks

Offline Anders L Madsen

  • HUGIN Expert
  • Hero Member
  • *****
  • Posts: 2295
    • View Profile
Re: Assigning a Normal Distribution to a Continuous Node
« Reply #1 on: July 09, 2008, 09:37:11 »
Hi,

To set the parameters of a Normal distribution you should use the methods for setting alphas, betas, and gammas. In the case of a node with no parents, the discrete configuration has index 0 and there is no beta value to specify.

You want to consult Section 2.6 and Chapter 4 of the HUGIN C API Reference Manual.

« Last Edit: July 09, 2008, 10:06:29 by Anders L Madsen »
HUGIN EXPERT A/S