Compiles a Bayesian network. This means creating a junction tree and establishing clique potentials.
add_jtree(object, root = NULL)# S3 method for cpt_grain
add_jtree(object, root = NULL)
# S3 method for pot_grain
add_jtree(object, root = NULL)
add_potential(object)
# S3 method for cpt_grain
add_potential(object)
# S3 method for pot_grain
add_potential(object)
# S3 method for grain
compile(
object,
propagate = FALSE,
root = NULL,
control = object$control,
details = 0,
...
)
# S3 method for cpt_grain
compile(
object,
propagate = FALSE,
root = NULL,
control = object$control,
details = 0,
...
)
# S3 method for pot_grain
compile(
object,
propagate = FALSE,
root = NULL,
control = object$control,
details = 0,
...
)
A grain object.
A set of variables which must be in the root of the junction tree
If TRUE the network is also propagated meaning that the cliques of the junction tree are calibrated to each other.
Controlling the compilation process.
For debugging info. Do not use.
Currently not used.
A compiled Bayesian network; an object of class
grain
.
S<U+00F8>ren H<U+00F8>jsgaard (2012). Graphical Independence Networks with the gRain Package for R. Journal of Statistical Software, 46(10), 1-26. http://www.jstatsoft.org/v46/i10/.
# NOT RUN {
## To be written
# }
Run the code above in your browser using DataLab