4. Naming Links
4.1 For Generalizing Equations
When you first start working with equations, you will probably use the names of the parent nodes in your equations. However, sometimes you will want a more local representation, so that you can disconnect some of the parents and hook the node up to new parents without having to change all the node names within the equation. Or you may want to copy and paste the equation from one node to another, without changing all the node names.
4.2 For Creating Net-snippet Libraries
Or perhaps you many wish to copy and paste the node to use with new parents. Or to put the node in a network library without any parents, so that it will be supplied with new parents when it is used.
The solution to all these problems is to use link names, sometimes called input names. They provide an argument name for each link entering the node (and therefore a proxy for each parent node). You can set them with the node dialog box. Simply set the Multi-Purpose box to "Input Name" and supply the names, one per line, or comma and/or space separated (link names are IDNames, so they are restricted to 30 characters or less and cannot contain spaces or other punctuation, and must start with an alphabetic character). You refer to them in your equation in exactly the same way you would the corresponding parent name. When a parent is disconnected, the link name will remain.
Note. If link names are defined for a node, then they must be used instead of the parent names.
A node can have some links named, and others unnamed.
Exercise. Try giving names to some of the links of one of your test nodes. Then disconnect that node (by deleting the nodes that have links to it). Note how the link names are preserved. Then cut and paste that net snippet
somewhere else in the net, or into another net and create new nodes to attach to the copied snippet. Again, note how the snippet preserves its link names.
Creating net-snippet libraries is a powerful use of Netica (net-snippets are just regular nets, but intended for re-use), and link naming makes them simpler to express conceptually and simpler to work with. With every Net you create, you may want to think about segmenting out the snippets that could be used in other Bayes net applications. These are in effect, sub-worlds within worlds.
|