Learn the structure of a Bayesian network from a data set containing missing values using Structural EM.
structural.em(x, maximize = "hc", maximize.args = list(), fit = "mle",
fit.args = list(), impute, impute.args = list(), return.all = FALSE,
start = NULL, max.iter = 5, debug = FALSE)
a data frame containing the variables in the model.
a character string, the score-based algorithm to be used in
the “maximization” step. See structure learning
for
details.
a list of arguments to be passed to the algorithm
specified by maximize
, such as restart
for hill-climbing or
tabu
for tabu search.
a character string, the parameter learning method to be used in
the “maximization” step. See bn.fit
for details.
a list of arguments to be passed to the parameter learning
method specified by fit
.
a character string, the imputation method to be used in the
“expectation” step. See impute
for details.
a list of arguments to be passed to the imputation method
specified by impute
.
a boolean value. See below for details.
a bn
or bn.fit
object, the network used to perform
the first imputation and as a starting point for the score-based
algorithm specified by maximize
.
an integer, the maximum number of iterations.
a boolean value. If TRUE
a lot of debugging output is
printed; otherwise the function is completely silent.
If return.all
is FALSE
, structural.em()
returns an object
of class bn
. (See bn-class
for details.)
If return.all
is TRUE
, structural.em()
returns a list
with three elements named dag
(an object of class bn
),
imputed
(a data frame containing the imputed data from the last
iteration) and fitted
(an object of class bn.fit
, again from
the last iteration; see bn.fit-class
for details).
Friedman N (1997). "Learning Belief Networks in the Presence of Missing Values and Hidden Variables". Proceedings of the 14th International Conference on Machine Learning, 125--133.