The HPBNET Procedure

PROC HPBNET Statement

  • PROC HPBNET <options>;

The PROC HPBNET statement invokes the procedure. Table 1 summarizes important options in the PROC HPBNET statement by function.

Table 1: PROC HPBNET Statement Options

Option Description
Data Options
DATA= Specifies the input data set
NUMBIN= Specifies the binning number for interval variables
PRESCREENING= Specifies the initial screening for the input variables
VARSELECT= Specifies the selection for the input variables
MISSINGINT= Specifies the missing value handling for interval variables
MISSINGNOM= Specifies the missing value handling for nominal variables
Independence Test Options
INDEPTEST= Specifies the methods for independence tests
ALPHA= Specifies the significance level for independence tests by using chi-square or G-square statistics
MIALPHA= Specifies the significant level for independence tests by using mutual information
Structure Learning Options
STRUCTURE= Specifies the network structure types
PARENTING= Specifies the structure learning methods
MAXPARENTS= Specifies the maximum number of parents allowed for each node in the network
Model Selection Options
BESTMODEL Requests that the best model be selected


You can specify the following options:

ALPHA=number

specifies the significance level for independence tests by using chi-square or G-square statistics. The valid range is 0 to 1, inclusive. If you want to choose the best model among several, you can specify up to five numbers, separated by spaces. If you specify multiple numbers but you do not specify the BESTMODEL option, PROC HPBNET uses the first number and ignores the remaining numbers.

By default, ALPHA = 0.05.

BESTMODEL

requests that the best model be selected by using a validation data subset. You can specify the validation data subset by using the PARTITION statement. If you specify this option, you can specify multiple values for the ALPHA=, PRESCREENING=, VARSELECT=, STRUCTURE=, and PARENTING= options. PROC HPBNET uses the misclassification errors on the validation data to automatically decide the best set of parameter values among these options.

By default, a best model is not selected.

DATA=SAS-data-set

names the SAS data set that contains the training and possibly the validation observations to be used by PROC HPBNET to train the Bayesian network.

The default input data set is the most recently created data set.

INDEPTEST=ALL | CHIGSQUARE | CHISQUARE | GSQUARE | MI

specifies the method for independence tests. You can specify the following values:

ALL

uses the chi-square, the G-square statistics, and the normalized mutual information for independence tests. A variable is independent of the target if both the p-values of the chi-square and the G-square statistics are greater than the specified ALPHA= value and the normalized mutual information is less than the specified MIALPHA= value.

CHIGSQUARE

uses both the chi-square and the G-square statistics for independence tests. A variable is independent of the target if both the p-values of the chi-square and the G-square statistics are greater than the specified ALPHA= value.

CHISQUARE

uses the chi-square statistics for independence tests. A variable is independent of the target if the p-value of the statistics is greater than the specified ALPHA= value.

GSQUARE

uses the G-square statistics for independence tests. A variable is independent of the target if the p-value of the statistics is greater than the specified ALPHA= value.

MI

uses the normalized mutual information for independence tests. A variable is independent of the target if the normalized mutual information is less than the specified MIALPHA= value.

By default, INDEPTEST=CHIGSQUARE.

MAXPARENTS=integer

specifies the maximum number of parents that is allowed for each node in the network structure. The valid range is 1 to 16, inclusive. If you specify the BESTMODEL option, PROC HPBNET calculates from 1 to integer and decides the best number of parents.

By default, MAXPARENTS=5.

MIALPHA=number

specifies the threshold for independence tests by using mutual information. The valid range is 0 to 1, inclusive.

By default, MIALPHA = 0.05.

MISSINGINT=IGNORE | IMPUTE

specifies the missing value handling for all the interval variables. You can specify the following values:

IGNORE

ignores the observations that have missing values in any of the interval variables.

IMPUTE

replaces the missing values in any interval variable by the mean of the variable.

By default, MISSINGINT=IGNORE.

MISSINGNOM=IGNORE | IMPUTE | LEVEL

specifies the missing value handling for all the nominal variables. You can specify the following values:

IGNORE

ignores the observations that have missing values in any of the nominal variables.

IMPUTE

replaces the missing values in any nominal variable by the mode of the variable.

LEVEL

treats the missing values in any nominal variable as a separate level of the variable.

By default, MISSINGNOM=IGNORE.

NUMBIN=integer
NBIN=integer

specifies the number of binning levels for all interval variables. PROC HPBNET bins each interval variable into integer equal-width levels. The valid range of integer is 2 to 1024, inclusive.

By default, NUMBIN=5.

STRUCTURE=MB | NAIVE | PC | TAN

specifies the network structure. Together with the MAXPARENTS= option, this option determines the network structure that the procedure learns from the training data. You can specify the following values:

MB

learns the Markov blanket of the target variable. The Markov blanket includes the parents, the children, and the other parents of the children. After learning the Markov blanket, PROC HPBNET further determines the parents of the target, the links from the parents to the children, and the links among the children. When you specify STRUCTURE=MB, the procedure learns the Markov blanket regardless of the values of PRESCREENING= and VARSELECT= options.

NAIVE

assumes a naive Bayesian network structure (that is, the target has a direct link to each input variable). If MAXPARENTS=1, the structure is a naive Bayesian network (NB). If MAXPARENTS is greater than 1, the structure is a Bayesian network-augmented naive Bayesian network (BAN).

PC

learns the parent-child Bayesian network structure (PC). PC differs from the NAIVE structure in that some input variables could be learned as the parents of the target variable. In addition, links from the parents to the children and among the children are also possible in PC.

TAN

learns the tree-augmented naive Bayesian network structure. The TAN structure includes a direct link from the target to each input variable plus a tree structure among the input variables.

If you want to choose the best structure among several structures, you can specify multiple values in any combination, separated by spaces, and also specify the BESTMODEL option. If you specify multiple structures but you do not specify the BESTMODEL option, PROC HPBNET uses the first value that you specify, and ignores the rest.

By default, STRUCTURE=PC.

PARENTING=BESTONE | BESTSET

specifies the algorithm for orienting the network structure. You can specify the following values:

BESTONE

uses a greedy approach to determine the parents of each node; that is, for each node, the best candidate is added as a parent of the node in each iteration.

BESTSET

determines the best set of variables among possible candidate sets as the parents of each node; that is, instead of adding one variable in an iteration, PROC HPBNET tests multiple sets of variables together and chooses the best set as the parents of the node.

If you want to choose between the two methods, you can specify both of them and also specify the BESTMODEL option. If you specify both methods but you do not specify the BESTMODEL option, PROC HPBNET uses the first specified method, and ignores the other.

By default, PARENTING=BESTSET.

PRESCREENING=0 | 1

specifies the initial screening for the input variables. You can specify the following values:

0

uses all the input variables.

1

uses only the input variables that are dependent on the target.

If you want to choose the best model with or without prescreening, you can specify PRESCREENING=0 1 or PRESCREENING= 1 0 and also specify the BESTMODEL option. If you specify both but you do not specify the BESTMODEL option, PROC HPBNET uses the first specified value, and ignores the other.

By default, PRESCREENING=1.

VARSELECT=0 | 1 | 2 | 3

specifies the selection for the input variables beyond the prescreening. You can specify the following values:

0

uses all input variables that remain after the initial screening is performed as specified in the PRESCREENING= option.

1

tests each input variables for conditional independence of the target variable given any other input variable. It uses only the variables that are conditionally dependent on the target given any other input variable.

2

tests each input variable further for conditional independence of the target variable given any subset of other input variables. It uses only the variables that are conditionally dependent on the target given any subset of other input variables.

3

determines the Markov blanket of the target variable and uses only the variables in the Markov blanket.

If you specify VARSELECT=1, 2, or 3, PROC HPBNET automatically tests each input variable for unconditional independence of the target regardless of the value of the PRESCREENING= option. If there are no variables left at a particular variable selection level, PROC HPBNET rolls back to the previous level. For example, if you specify VARSELECT=3 and there are no variables in the Markov blanket of the target, PROC HPBNET uses the variables from the previous level, VARSELECT=2.

If you want to choose the best model among different levels of variable selections, you can specify any combination of values for the VARSELECT= option and also specify the BESTMODEL option. If you specify multiple values for the VARSELECT= but you do not specify the BESTMODEL option, PROC HPBNET uses the first specified value, and ignores the remaining values.

By default, VARSELECT=1.

Last updated: May 25, 2022