Learn R Programming

BayesNetBP (version 1.0.1)

ElimTreeInitialize: Initialize the elimination tree

Description

Initialize the elimination tree with the local models

Usage

ElimTreeInitialize(tree, dag, model, node.sets, node.class)

Arguments

tree

a graphNEL object of the elimination tree

dag

a graphNEL object of the Bayesian network

model

a list of local models built from LocalModelCompile function

node.sets

a list of cluster sets obtained from ClusterTreeCompile function

node.class

a named vector of logical values, TRUE if node is discrete, FASLE if otherwise

Value

clustertree object with the local models incorporated

Details

Initialize the elimination tree with the local models

References

Cowell, R. G. (2005). Local propagation in conditional Gaussian Bayesian networks. Journal of Machine Learning Research, 6(Sep), 1517-1550.

See Also

The functions ClusterTreeCompile and LocalModelCompile provide necessary objects to obtain clustertree object by initializing the elimination tree through this function.

Examples

Run this code

data(liver)
cst <- ClusterTreeCompile(dag=liver$dag, node.class=liver$node.class)
models <- LocalModelCompile(data=liver$data, dag=liver$dag, node.class=liver$node.class)
tree.init <- ElimTreeInitialize(tree=cst$tree.graph, 
                                dag=cst$dag, 
                                model=models, 
                                node.sets=cst$cluster.sets, 
                                node.class=cst$node.class)

Run the code above in your browser using DataLab