The HPBNET Procedure

Example 4.3 Parent-Child Bayesian Network

This example also uses the Iris data set that is available in the Sashelp library. In the following statements, STRUCTURE=PC results in a parent-child Bayesian network.

 proc hpbnet data=sashelp.Iris numbin=3 structure=PC
             prescreening=0 varselect=0;
     target Species;
     input PetalWidth PetalLength SepalLength SepalWidth/level=INT;
     output network=network;
 run;

The following statements produce Figure 6, which shows the network structure. In the structure, PetalLength is the parent of Species, and Species is the parent of PetalWidth, SepalLength, and SepalWidth.

 proc print data=network noobs label;
     var _parentnode_ _childnode_;
     where _type_="STRUCTURE";
 run;

Figure 6: Parent-Child Network Structure

Parent NodeChild Node
PetalLengthSpecies
SpeciesPetalWidth
SpeciesSepalLength
SpeciesSepalWidth


Last updated: May 25, 2022