perform belief propagation.
belief.propagation.Rd
Perform belief propagation for the network of an InferenceEngine, given a set of observations.
In the current version of SGS
, belief propagation can be computed only over a junction tree.
Usage
belief.propagation(ie, observations = NULL, return.potentials = FALSE)
# S4 method for InferenceEngine
belief.propagation(ie, observations = NULL, return.potentials = FALSE)
Arguments
- ie
an
InferenceEngine
object.- observations
list of observations, consisting in two vector,
observed.vars
for the observed variables, andobserved.vals
for the values taken by the variables listed inobserved.vars
. If no observations are provided, theInferenceEngine
will use the ones it already contains.- return.potentials
if TRUE only the potentials are returned, instead of the default
BN
.
Value
updated InferenceEngine
object.