Learn R Programming

bnstruct (version 1.0.15)

get.most.probable.values: compute the most probable values to be observed.

Description

Return an array containing the values that each variable of the network is more likely to take, according to the CPTS. In case of ties take the first value.

Usage

get.most.probable.values(x, prev.values = NULL)

# S4 method for BN get.most.probable.values(x, prev.values = NULL)

# S4 method for InferenceEngine get.most.probable.values(x, prev.values = NULL)

Value

array containing, in each position, the most probable value for the corresponding variable.

Arguments

x

a BN or InferenceEngine object.

prev.values

vector of size num.nodes containing an existing observation to complete (NULL if none).

Examples

Run this code
if (FALSE) {
# try with a BN object x
get.most.probable.values(x)

# now build an InferenceEngine object
eng <- InferenceEngine(x)
get.most.probable.values(eng)
}
 

Run the code above in your browser using DataLab