Learn R Programming

gRain (version 0.8.1)

compile.grain: Compile a graphical independence network (a Bayesian network)

Description

Compiles a Bayesian network. This means creating a junction tree and establishing clique potentials.

Usage

## S3 method for class 'grain':
compile(object, method = "mcwh", propagate = FALSE, root = NULL, smooth = 0, control = object$control, details = 0, ...)

Arguments

object
A grain object
method
Triangulation method. Currently only "mcwh" is available
propagate
If TRUE the network is also propagated meaning that the cliques of the junction tree are calibrated to each other.
root
A set of variables which must be in the root of the junction tree
smooth
If non-zero this value is added to all potentials (to avoid zeros in the joint distribution)
control
Controlling the compilation process.
details
For debugging info. Do not use.
...
Currently not used.

Value

  • A compiled Bayesian network; an object of class compgrain.

See Also

grain, propagate