Learn R Programming

BayesNetBP (version 1.6.1)

LocalModelCompile: Model compilation

Description

Compile the local models

Usage

LocalModelCompile(data, dag = NULL, node.class = NULL)

Arguments

data

a data.frame object or a qtlnet object

dag

NULL if data is qtlnet object, or a graphNEL object of conditional Gaussian Bayesian network if data is data.frame.

node.class

NULL if data is qtlnet object, or a vector of logical values named by node names, TRUE for discrete, FALSE for continuous variables if data is data.frame.

Value

pots

a list of discrete potentials (conditional probability tables) for each discrete variable.

bags

a list of sets of continuous potentials (lppotentials), each set for a continuous variables.

Details

This function compiles the local models, including the conditional probability tables for discrete variables, and linear predictor potentials for continuous variables. The qtlnet and qtl package need to be installed if data is a qtlnet object.

References

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

Yu H, Moharil J, Blair RH (2020). BayesNetBP: An R Package for Probabilistic Reasoning in Bayesian Networks. Journal of Statistical Software, 94(3), 1-31. <doi:10.18637/jss.v094.i03>.

See Also

ElimTreeInitialize

Examples

Run this code
# NOT RUN {
data(liver)
models <- LocalModelCompile(data=liver$data, dag=liver$dag, node.class=liver$node.class)

# }

Run the code above in your browser using DataLab