The HPBNET Procedure
Example 4.2 Tree-Augmented Naive Bayesian Network
This example also uses the Iris data set that is available in the Sashelp library. In the following statements, STRUCTURE=TAN results in a tree-augmented Bayesian network.
proc hpbnet data=sashelp.Iris numbin=3 structure=TAN
prescreening=0 varselect=0;
target Species;
input PetalWidth PetalLength SepalLength SepalWidth/level=INT;
output network=network;
run;
The following statements produce Figure 5, which shows the network structure. In the structure, Species is a parent of PetalWidth, PetalLength, SepalLength, and SepalWidth. In addition, PetalWidth is a parent PetalLength, SepalWidth is a parent of SepalLength, and PetalWidth is a parent of SepalWidth.
proc print data=network noobs label;
var _parentnode_ _childnode_;
where _type_="STRUCTURE";
run;
Figure 5: TAN Network Structure
| Parent Node | Child Node |
|---|---|
| Species | PetalLength |
| PetalWidth | PetalLength |
| Species | PetalWidth |
| Species | SepalLength |
| SepalWidth | SepalLength |
| Species | SepalWidth |
| PetalWidth | SepalWidth |
Last updated: May 25, 2022