The order of probabilities is given by considering the state of the first parent of the node as the most significant coordinate (thinking of the coordinates in terms of bits), then the second parent, and so on, and finally considering the coordinate of the node itself as the least significant one.
The order of CPT depends on the order of adding nodes and arcs, as well as the order of defining states.
net.AddNode(Network.NodeType.Cpt, "R");
net.SetOutcomeId("R", 0, "T");
net.SetOutcomeId("R", 1, "F");
net.AddNode(Network.NodeType.Cpt, "C");
net.SetOutcomeId("C", 0, "T");
net.SetOutcomeId("C", 1, "F");
net.AddNode(Network.NodeType.Cpt, "Hr");
net.AddArc("R", "Hr");
net.AddArc("C", "Hr");
So T is the first state; R is the first parent and C is the second parent. Here we have T state = 1; F state = 0;
node itself (Hr) | first parent (R) | second parent (C) |
1 | 1 | 1 |
0 | 1 | 1 |
1 | 1 | 0 |
0 | 1 | 0 |
1 | 0 | 1 |
0 | 0 | 1 |
1 | 0 | 0 |
0 | 0 | 0 |