uniform4bn: introduces a uniform distribution on one node

Description Usage Arguments Details Value Examples

Description

(bn) A new bn is generated from the initial bn where the ion-th node is modified with a uniform distribution without parents. Then the structure of the bn can be different.

Usage

1
uniform4bn(bn, ion, val=rbsb.num0)

Arguments

bn

The original bn.

ion

The definition of the node (iin or name)

val

(numeric) Defines the range of the uniform distribution. For a numeric node it is a numeric(2); for a categoric node, it is a character(p). Be aware that the lpod are not modified from the initial bn. The default uses the lpod (see the DETAILS section). In case of multivariate or repeated node, when the default is not used, val must be a matrix with as many rows as variables, the first column for the lower limit of the uniform and the second column for the upper limit of the uniform.

Details

If numeric, the limits for the uniform are taken from lpod (or lred if infinite). If categoric, the limits are numcat uniform onto lpod.
This modification of node is possible only for univariate nodes.

Value

The resulting bn

Examples

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

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