Description Usage Arguments Value Examples
Perform belief propagation for the network of an InferenceEngine, given a set of observations.
In the current version of bnstruct
, belief propagation can be computed only over a junction tree.
1 2 3 4 | belief.propagation(ie, observations = NULL, return.potentials = FALSE)
## S4 method for signature 'InferenceEngine'
belief.propagation(ie, observations = NULL, return.potentials = FALSE)
|
ie |
an |
observations |
list of observations, consisting in two vector, |
return.potentials |
if TRUE only the potentials are returned, instead of the default |
updated InferenceEngine
object.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
dataset <- BNDataset("file.header", "file.data")
bn <- BN(dataset)
ie <- InferenceEngine(bn)
ie <- belief.propagation(ie)
observations(ie) <- list("observed.vars"=("A","G","X"), "observed.vals"=c(1,2,1))
belief.propagation(ie)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.