BCONSTRUCT procedure
Constructs a tree (R.W. Payne).
Option
Parameters
Description
BCONSTRUCT is a utility procedure that is used by the tree procedures like BCLASSIFICATION, BKEY and BREGRESSION to construct trees. It calls a procedure BSELECT to determine the test to be performed at each node of the tree. Customized versions of this procedure are available for each type of tree, and are accessed automatically along with the top-level procedure for the type of tree concerned. BCONSTRUCT is thus completely general - and can be used for other types of tree simply by providing an appropriate version of BSELECT.
The DATA parameter of BCONSTRUCT supplies a pointer containing the information required to construct the tree. (This is then passed through to BSELECT, together with information about the node for which a test is to be selected.) The TREE parameter saves the tree that has been constructed, and the PRINT option can be set to monitoring to produce monitoring information during construction.
Option: PRINT.
Parameters: TREE, DATA.
Method
BCONSTRUCT calls a procedure BSELECT to decide which test to use at each node of the tree. This must be customized according to the type of tree that is required. BSELECT has no options. Its parameters are as follows.
After BSELECT has selected a test, the tree is extended by the BGROW directive, function BTERMINAL is used to find the next terminal node, and functions BPATH and BBRANCHES are used to ascertain the nodes and branches between that node and the root.
Action with
RESTRICT
The use of any restrictions will depend on the BSELECT procedure, called by BCONSTRUCT.