grain_propagate | R Documentation |
Propagation refers to calibrating the cliques of the junction tree so that the clique potentials are consistent on their intersections; refer to the reference below for details.
## S3 method for class 'grain'
propagate(object, details = object$details, engine = "cpp", ...)
propagateLS(cq_pot_list, rip, initialize = TRUE, details = 0)
object |
A grain object |
details |
For debugging info |
engine |
Either "R" or "cpp"; "cpp" is the default and the fastest. |
... |
Currently not used |
cq_pot_list |
List of clique potentials |
rip |
A rip ordering |
initialize |
Always true. |
The propagate
method invokes propagateLS
which is a pure R implementation of the Lauritzen-Spiegelhalter
algorithm. The c++ based version is several times faster than
the purely R based version.
A compiled and propagated grain object.
Søren Højsgaard, sorenh@math.aau.dk
Søren Højsgaard (2012). Graphical Independence Networks with the gRain Package for R. Journal of Statistical Software, 46(10), 1-26. https://www.jstatsoft.org/v46/i10/.
grain
, compile
example("grain")
## Uncompiled and unpropageted network:
bn0 <- grain(chest_cpt, compile=FALSE)
bn0
## Compiled but unpropageted network:
bn1 <- compile(bn0, propagate=FALSE)
## Compiled and propagated network
bn2 <- propagate(bn1)
bn2
## Default is that networks are compiled but not propagated at creation time:
bn3 <- grain(chest_cpt)
bn3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.