Grouping Node States

Netica

Grouping Node States

Sometimes it is useful to organize the states of a node into groups, which effectively gives it a coarser resolution.  Both the finer resolution and the coarser one can be used in the same Bayes net.  Since the coarser node is less precise, using it instead of the fine one will result in less precise results, but the difference might be insignificant.

You have to judge what is appropriate for your particular application.

For Example: You may want to group the states of a country into regions.  For example the finer node would have states CA,FL,TX,VA, etc. while the coarse one would have states West, Midwest, South, etc.

Another example is a continuous node that is = 4 && typeof(BSPSPopupOnMouseOver) == 'function') BSPSPopupOnMouseOver(event);" class="BSSCPopup" onclick="BSSCPopup('X_PU_discretize.htm');return false;">discretized with different resolutions.  For example a coarse temperature node may have the = 4 && typeof(BSPSPopupOnMouseOver) == 'function') BSPSPopupOnMouseOver(event);" class="BSSCPopup" onclick="BSSCPopup('X_PU_state_threshold.htm');return false;">thresholds 0,10,20, etc. while the fine one has thresholds 0,5,10,15, etc.

Reasons for grouping states:

 Because you have probabilities for the = 4 && typeof(BSPSPopupOnMouseOver) == 'function') BSPSPopupOnMouseOver(event);" class="BSSCPopup" onclick="BSSCPopup('X_PU_CPT.htm');return false;">CPTs of other nodes given the coarse node, but not given the fine node.  Or perhaps you just want to elicit the probabilities relating to the coarse node because the tables are smaller, and it is easier.

 You want the Bayes net to learn from multiple data sources (e.g. two different databases), and they describe variables in different ways (perhaps one is more detailed, and provides more possible states for a variable).

 To ease the computational burden (e.g. using the coarse node instead of the fine one as the parent to those nodes that have a lot of other parents).

 You want to display results in summarized form.  Perhaps the end-user viewing the belief-bar display wants to see the probabilities for a whole group of states, instead of a detailed breakdown.

 You may want to allow for the entry of findings that aren't specified precisely.  For example, allowing an entry of "car" for a Vehicle_Type node, rather than "sedan", "station wagon", etc. since that information might not be known.  Essentially, this results in entering a logical disjunction over the finer states.

 You are only interested in one particular state, and you group the rest of them together as "other".

How To:  Make two nodes and give them names that are almost the same, to indicate they are for the same variable.  Perhaps the coarser one could be suffixed with "_Approx".  Sometimes it is best to append a word which describes the level of resolution, such as "Country", "Region" or "Province".

One node should be given the set of fine states, the other given the set of coarse states.

In the case of a continuous variable, the finer node would have the same threshold levels as the coarse one, but with some extra thresholds added.  If the fine node is missing some of the thresholds the coarse one has, the method will still work, but will introduce extra uncertainty, since Netica must turn the coarse node into a = 4 && typeof(BSPSPopupOnMouseOver) == 'function') BSPSPopupOnMouseOver(event);" class="BSSCPopup" onclick="BSSCPopup('X_PU_chance_node.htm');return false;">chance node when it builds the table.

Draw a link from the fine node to the coarse node.  That must be the only link entering the coarse node (if you need to have other links entering it, use the "equality constraint link" method instead).

Enter a table to show the functional relationship between the fine and coarse nodes.  Bring up the table editor for the coarse node, change it from Chance to Deterministic, and then go through all the rows (they correspond to the states of the fine node), entering in the right hand column the equivalent state for the coarse node (by clicking on it and choosing from the menu).

Instead you may want to show the functional relationship with an equation.  Bring up the node properties box for the coarse node, use the multi-purpose selector at the bottom to choose Equation, and then enter an equation like:

VoterRegion (VoterState) =

(VoterState == CA) ? West:

(VoterState == OR) ? West:

(VoterState == FL) ? South:

...

(VoterState == VA) ? East: Other

 

or you could use the style:

VoterRegion (VoterState) =

(VoterState == CA || VoterState == OR || VoterState == WA) ? West:

(VoterState == FL || VoterState == TX) ? South:

...

(VoterState == VA || VoterState == NY || VoterState == MA) ? East: Other

 

For discretized continuous nodes, you simple put an equality, such as:

Temperature_Approx (Temperature) = Temperature

After entering the equation, click OK on the dialog, and convert the equation to a table.

Then link the two nodes into the network the way you want.  Each can be a parent or child to any other node you want, except the coarse node can not be a child.  If that is required, use an "equality constraint link".

Remember, if you are using Netica to learn from data, giving a node the state "other" will catch any state you haven't explicitly given the node.