Author Topic: interval nodes  (Read 10432 times)

Offline joost

  • Newbie
  • *
  • Posts: 7
    • View Profile
interval nodes
« on: May 16, 2007, 16:04:15 »
How exactly does Hugin compute with interval nodes? E.g. let A be the parent node of B where A consists of the intervals 0-1 and 1-2, and B consists of the intervals 0-1,1-2,2-3,3-4, and the likelihood relation is B=2*A. We observe probability mass table:
        a1      a2
b1   0.48    0
b2   0.52    0
b3   0         0.48
b4   0         0.52
Why isn't 50% of the probabilty mass of B in [0,1) and 50% in [1,2) for A \in [0,1) and
50% of the probabilty mass of B in [2,3) and 50% in [3,4) for A \in [1,2)?

Can B also be numbered s.t. by an expression the intervals of A get transformed into a number?

Offline Gary

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: interval nodes
« Reply #1 on: May 16, 2007, 17:52:38 »
Joost - this effect arises from the way that the table generator builds a table. It uses a set of points distributed over the (input)  intervals and performs the computation (described by your expression) at each point. It weights elements of the cpt in terms of the fraction of the points which occur in each output interval.

By default there are 25 evenly distributed points so that the output probabilities have to be in units of 1/25 ... you have probs 12/25 and 13/25...

If in edit mode you select B the goto expressions ... and select 'samples per interval' ... you will see 25 in the text box ... change it to 26 (or any even number) and recompile ... bingo!

Actually this situation is not ideal ... but is a property of any numerical integration scheme. Arithmetic addition is particularly susceptible to this problem. (You can only use numerical nodes if you know the complete set of output states (very rare for computation with discretized continuous variables) or if you are willing to accept some truncation etc. (e.g. using the floor() function).

If you are willing to compute cpts outside of the table generator there are some simple routines for these kind of structures