16
Patterns & Predictions / End of Life
« on: September 21, 2011, 14:53:00 »
This product has reached end of life.
Welcome the HUGIN Forum!
HUGIN is a tool for probabilistic graphical models.
We hope you enjoy using our forum.
Thanks!
HUGIN Expert A/S
Registration and Spam Robots
We have disabled the automatic member registration function due to the increasing number of spam-robot member registrations.
How To Create a Member Account
Simply send an email with your user name to forum (at) hugin (dot) com, and we will create a member account for you.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
ghapi = NET.addAssembly ('C:\Program Files\Hugin Expert\Hugin Researcher 7.4\HDE7.4CS\Lib\hugincs-7.4-2.0-x64.dll');
cc = HAPI.ClassCollection();
cc.ParseClasses ('C:\Program Files\Hugin Expert\Hugin Researcher 7.4\Samples\oobn\StudFarm.net', HAPI.DefaultClassParseListener);
c = cc.GetClassByName ('StudFarm');
d = c.CreateDomain ();
d.Compile ();
d.GetNodeByName ('John.offspring').GetBelief (0)
ans =
0.2734
Unfortunately I am having some issues running hugin on my ubuntu 10.04 system:
anders@ubuntu:> bin $ ./hugin
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class COM.hugin.HAPI.Native.HAPI
at COM.hugin.HAPI.NetworkModel.getNativeID(NetworkModel.java:527)
at COM.hugin.HGUI.HuginGUIUtils.setRunningAndValidateAPIVersion(HuginGUIUtils.java:83)
at COM.hugin.HGUI.Hugin.<init>(Hugin.java:193)
at COM.hugin.HGUI.Hugin.main(Hugin.java:322)
...
ghapi = NET.addAssembly ('C:\Program Files\Hugin Expert\Hugin Researcher 7.4\HDE7.4CS\Lib\hugincs-7.4-2.0-x64.dll');
d = HAPI.Domain ('C:\Program Files\Hugin Expert\Hugin Researcher 7.4\Samples\ChestClinic.net', HAPI.DefaultClassParseListener);
L = d.GetNodeByName ('L');
d.Compile ();
L.GetBelief (0)
ans =
0.0550
L.GetBelief (1)
ans =
0.9450
X = d.GetNodeByName ('X');
X.SelectState (0);
d.Propagate (HAPI.Equilibrium.H_EQUILIBRIUM_SUM, HAPI.EvidenceMode.H_EVIDENCE_MODE_NORMAL);
L.GetBelief (0)
ans =
0.4887
L.GetBelief (1)
ans =
0.5113
Sub oobn_example()
Dim ClassColl As ClassCollection
Dim hClass As Class, hMainClass As Class
Dim NodeA As Node, InputNode As Node, OutputNode As Node, NodeB As Node
Dim instanceNode As Node
On Error GoTo errorhandler
' Create class collection
Set ClassColl = GetNewClassCollection
' Create class
Set hClass = ClassColl.GetNewClass()
hClass.name = "hClass"
'Tell:
MsgBox ("Class created!")
'Create some nodes
Set NodeA = hClass.GetNewNode(hCategoryChance, hKindDiscrete)
NodeA.name = "NodeA"
Set InputNode = hClass.GetNewNode(hCategoryChance, hKindDiscrete)
InputNode.name = "Input"
InputNode.AddToInputs
Set OutputNode = hClass.GetNewNode(hCategoryChance, hKindDiscrete)
OutputNode.name = "OutputNode"
OutputNode.AddToOutputs
'Tell:
MsgBox ("Nodes created!")
' Adding Structure Input->A->Output
Call NodeA.AddParent(InputNode)
Call OutputNode.AddParent(NodeA)
'Tell:
MsgBox ("Structure created!")
' Creating main class
Set hMainClass = ClassColl.GetNewClass()
hMainClass.name = "main_class"
' create instance of hClass
Set instanceNode = hMainClass.AddNewInstance(hClass)
' create node in hMainClass
Set NodeB = hMainClass.GetNewNode(hCategoryChance, hKindDiscrete)
NodeB.name = "NodeB"
' link NodeB to instanceNode.Input
Call instanceNode.SetInput(InputNode, NodeB)
'Tell:
MsgBox ("Main class created!")
' save class collection
ClassColl.SaveAsNet ("C:\oobn_example.oobn")
Exit Sub
errorhandler:
MsgBox ("Error: " & Err.Description)
Exit Sub
End Sub
How do you determine what the prior experience values should be if you derive your prior CPTs directly from expert elicitation (and not from a dataset, in which case the prior experience values would correspond to the number of data points)?
How is HUGIN treating missing data in parameter learning? When I include missing data in the data input files and use the EM algorithm to learn the CPT tables, I get non-integer experience values. When I remove the rows with missing data, I get only integer experience values.) How is HUGIN extrapolating to calculate these non-integer experience values?