nd2bn: extracts the sub-bn comprising a node and its direct parents

Description Usage Arguments Details Value Examples

Description

(bn) From a given bn and for one its node (defined by ion), the bn comprising this node and its direct parent is extracted. Every parent is given a uniform distribution.

Usage

1
nd2bn(bn, ion)

Arguments

bn

The original bn.

ion

The definition of the target node.

Details

The two limits used for the uniform distribution of the parents are taken from their @lpod or @lred attributes. If these limits are not convenient, they can easily being modified with mnd4bn function afterwards. When there are more than one parent, the uniform are independent. See also uniform4bn for the description of uniform in case of multivariate and repeated nodes.

Value

The resulting bn.

Examples

1
2
3
4
 rebastaba3k("RESET"); # (only for R checking)
 print(nd2bn(rebastaba.bn1, 3));
 print(nd2bn(rebastaba.bn2, "B"));
 print(nd2bn(rebastaba.bn2, 1));

rebastaba documentation built on May 2, 2019, 5:24 p.m.

Related to nd2bn in rebastaba...