Dirac4bn: introduce a Dirac distribution on one univariate node

Description Usage Arguments Value Examples

Description

(bn) A new bn is generated from the initial bn where the ion-th node is modified with a Dirac distribution without parents. Then the structure of the bn can be different. Parameter 'val' gives the value to provide.

Usage

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

Arguments

bn

The original bn.

ion

The definition of the node (iin or name vector)

val

The value to give to the node. Must be a numeric if the node is numeric and a character if it is categoric (belonging to the lpod).
Default will imply the mean value of the lcod for numeric and a median category for categoric (using the order of the categories).

Value

The resulting bn

Examples

1
2
3
4
5
6
 rebastaba3k("RESET"); # (only for R checking)
 print(Dirac4bn(rebastaba.bn2, 1));
 uu <- and4bn(rebastaba.bn1, new8alk(char2des("NC1"), ltype="numcat", 
 lpara=list(p=1:4), lpod=list(LETTERS[1:4])))
 print(uu, quoi="l", qui=4);
 print(Dirac4bn(uu, 4), quoi="l", qui=4);

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