Author Topic: modelling a simple BN  (Read 16625 times)

Offline coldfire

  • Newbie
  • *
  • Posts: 13
    • View Profile
modelling a simple BN
« on: March 17, 2009, 14:38:47 »
what set of tutorials and exmaples i have to follow to build a BN for uncertain reasoning....i want to achieve the scenario, where we passed two or three conditions out of eight or nine conditions, and than the final inference node should show the probability of it being happening (either from max-propagation or sum propagation) IMAGE Attached


and BTW I need to clear some confusions between
Sum propagation and Max Propagation

Offline Anders L Madsen

  • HUGIN Expert
  • Hero Member
  • *****
  • Posts: 2295
    • View Profile
Re: modelling a simple BN
« Reply #1 on: March 20, 2009, 11:03:46 »
Under the section http://www.hugin.com/technology/ there is a number of tutorials on the use of HUGIN software for building Bayesian networks and influence diagrams. There exists a number of books that give a basic introduction to the technology, e.g.,:
http://www.hugin.com/technology/Publications/BNID/

See also http://forum.hugin.com/index.php?topic=138.msg278#msg278

The difference between a sum-propagation and a max-propagation is that a sum-propagation computes the posterior probability distribution of each unobserved node given a set of evidence whereas a max-propagation determines the configuration of all nodes with the highest probability given a set of evidence.

Hope this helps.
« Last Edit: June 28, 2012, 12:13:16 by Anders L Madsen »
HUGIN EXPERT A/S

Offline coldfire

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: modelling a simple BN
« Reply #2 on: June 15, 2009, 12:15:12 »
thanks for all the help lately.....i just came back to working on hugin again...

i want to know the Java API function for getting the Max-Propagation Value of Domain/Model that I have loaded as a .net file. I could not find it and i need it badly.

thanks in advance.

Offline Martin

  • HUGIN Expert
  • Hero Member
  • *****
  • Posts: 613
    • View Profile
Re: modelling a simple BN
« Reply #3 on: June 15, 2009, 12:44:58 »
Check out the javadoc for Domain.propagate

The method takes two arguments of type Domain.Equilibrium and Domain.EvidenceMode.

The Domain class has static fields for this purpose
H_EQUILIBRIUM_MAX
H_EQUILIBRIUM_SUM

and
H_EVIDENCE_MODE_FAST_RETRACTION
H_EVIDENCE_MODE_NORMAL

The desired fields should be passed as parameters to Domain.propagate, e.g. specify Domain.H_EQUILIBRIUM_MAX for max propagation instead of Domain.H_EQUILIBRIUM_SUM for sum propagation.

Code: [Select]
Domain d = ...
d.propagate(Domain.H_EQUILIBRIUM_MAX, ...);

The difference between max/sum and fast retraction/normal evidence mode can be found in the API reference manual (the PDF-file) in chapter 9 (more specific 9.1.1 Summation and maximization, and 9.1.2 Evidence incorporation mode).
Hugin Expert A/S

Offline coldfire

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: modelling a simple BN
« Reply #4 on: June 15, 2009, 13:22:45 »
thanks, that solved the problem, to get P(max), I propagated with MAX like below

domain.propagate (Domain.H_EQUILIBRIUM_MAX,
                Domain.H_EVIDENCE_MODE_NORMAL);

and than later to get the max P(most likely configuration, evidence) i used "domain.getSignificanceLevel()"

Offline Martin

  • HUGIN Expert
  • Hero Member
  • *****
  • Posts: 613
    • View Profile
Re: modelling a simple BN
« Reply #5 on: June 15, 2009, 15:13:30 »
You should use Domain.getNormalizationConstant.

(getSignificanceLevel has to do with structural learning)
Hugin Expert A/S

Offline coldfire

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: modelling a simple BN
« Reply #6 on: June 15, 2009, 17:48:48 »
oh yes... thanks