InferenceEngine-class {bnstruct} | R 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, ...)

### 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.

### 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`.

### 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)

[Package bnstruct version 1.0.6 Index]