InferenceEngine-class: InferenceEngine class.

InferenceEngine-classR Documentation

InferenceEngine class.

Description

InferenceEngine class.

Constructor method of InferenceEngine class.

constructor for InferenceEngine object

Usage

## S4 method for signature 'InferenceEngine'
initialize(.Object, ...)

InferenceEngine(bn = NULL, observations = NULL, interventions = NULL, ...)

Arguments

.Object

an empty InferenceEngine object.

...

potential further arguments of methods.

bn

a BN object.

observations

a list of observations composed by the two following vectors:

  • observed.vars:vector of observed variables;

  • observed.vals:vector of values observed for the variables in observed.vars in the corresponding position.

interventions

a list of interventions composed of the following two vectors:

  • intervention.vars:vector of variables for which an intervention has been performed;

  • intervention.vals:vector of values chosen for the variables in intervention.vals in the corresponding position.

Value

an InferenceEngine object.

InferenceEngine object.

Slots

junction.tree:

junction tree adjacency matrix.

num.nodes:

number of nodes in the junction tree.

cliques:

list of cliques composing the nodes of the junction tree.

triangulated.graph:

adjacency matrix of the original triangulated graph.

jpts:

inferred joint probability tables.

bn:

original Bayesian Network (as object of class BN) as provided by the user, or learnt from a dataset. NULL if missing.

updated.bn:

Bayesian Network (as object of class BN) as modified by a belief propagation computation. In particular, it will have different conditional probability tables with respect to its original version. NULL if missing.

observed.vars:

list of observed variables, by name or number.

observed.vals:

list of observed values for the corresponding variables in observed.vars.

intervention.vars:

list of manipulated variables, by name or number.

intervention.vals:

list of specified values for the corresponding variables in intervention.vars.

Examples

## Not run: 
dataset <- BNDataset()
dataset <- read.dataset(dataset, "file.header", "file.data")
bn <- BN(dataset)
eng <- InferenceEngine(bn)

obs <- list(c("A","G,"X),c(1,2,1))
eng.2 <- InferenceEngine(bn, obs)

## End(Not run)


bnstruct documentation built on Dec. 1, 2022, 1:22 a.m.