1. Create an Excel Spreadsheet
3. Discretize or Combine States
4. Add Link Structure
6. Use the Resulting Bayes Net
Once the appropriate nodes are in place and their discretization levels chosen, add the link structure that you want to work with. You can do this manually as described below, or you can use TAN Learning.
If there is one variable of interest that is most important (called the “target variable” or “target node”), then it is best to draw links from it to all the other nodes. That way you are directly capturing its single relationship with each of the other nodes.
Remember that each node should not have too many links entering it, since then its CPT table will be too large, and there will not be enough sampling information in the spreadsheet to adequately fill all the cells.
There is no problem in having a great many links leaving a node, and since Netica will do Bayesian inference on the results, it is okay for links to go in either direction. That is why to classify, predict or diagnosis a particular variable with the best accuracy, you want to capture its relation with as many of the other variables as possible, so you put many links leaving that variable.
If the only links that are present in the net are ones that leave the target node, then although the way that each other node effects the target node has been captured, they are only being considered in isolation, and synergistic effects of the way in which they effect the target node are being lost.
Example: Say that we want to capture the synergy between the 3 strongest influencers of the target node. We might use “Sensitivity to Findings” (see further below) to identify these 3 nodes. Then we can put links from those 3 nodes into the target node, and from the target node to all the other nodes. In effect that says, “Consider in detail the synergy between the 3 most important influencers of the target node, and for the rest of the nodes, consider all of them, but not all the synergies between them.”
Using Inference: Since Netica does Bayesian inference, there is an alternate way to accomplish the above, that isn’t immediately intuitive. We can have links going from the target node to each of the other nodes, and then just put links between the strongest influencers. This method will produce the same results, and it is preferable, since it makes exploring a number of models easier. Also, it allows linking two variables whose synergistic effects we want to explore, and linking another two such variables, and yet still considering the two pairs as independently influencing the target variable.
Sometimes you want to put links simply to create a CPT with certain parent nodes, so that you can later observe the conditional probabilities in that table.
If you want to take advantage of domain independence information, or you are developing a causal model, that may also influence the direction of links you choose. However, keep in mind it is possible to learn the CPTs using one link structure, then later reverse and delete links to capture the causal directions you want, as described further in this section.
In general, there are many possibilities for good link structures, depending on what you want to accomplish. You may want to experiment with a few different structures, to see the results you get from each. For example, you can use Netica to do structure learning by writing your own small program that tests a number of candidate link structures to find the best one. You write a function which searches through some candidate link structures that are plausible and practical in your domain, perhaps also adding trial latent variables. For each structure you use Netica’s parameter learning functions described in learning from cases, then test the resulting net with Netica’s net testing functions also described in this chapter. The net that scores the highest (perhaps penalized for complexity) is the best structure.
Add Links Fast: To draw links from one node to a whole set of nodes, select the set of nodes, then draw a single link from the desired parent node to one of the selected nodes, and Netica will add all the links.
Home > Learning From Cases > Learning From an Excel File > Add Link Structure