Learn the structure of a Bayesian network using a hill-climbing (HC) or a Tabu search (TABU) greedy search.
hc(x, start = NULL, whitelist = NULL, blacklist = NULL, score = NULL, ...,
debug = FALSE, restart = 0, perturb = 1, max.iter = Inf, maxp = Inf, optimized = TRUE)
tabu(x, start = NULL, whitelist = NULL, blacklist = NULL, score = NULL, ...,
debug = FALSE, tabu = 10, max.tabu = tabu, max.iter = Inf, maxp = Inf, optimized = TRUE)
An object of class bn
. See bn-class
for details.
a data frame containing the variables in the model.
an object of class bn
, the preseeded directed acyclic
graph used to initialize the algorithm. If none is specified, an empty one
(i.e. without any arc) is used.
a data frame with two columns (optionally labeled "from" and "to"), containing a set of arcs to be included in the graph.
a data frame with two columns (optionally labeled "from" and "to"), containing a set of arcs not to be included in the graph.
a character string, the label of the network score to be used in
the algorithm. If none is specified, the default score is the Bayesian
Information Criterion for both discrete and continuous data sets. See
network scores
for details.
additional tuning parameters for the network score. See
score
for details.
a boolean value. If TRUE
a lot of debugging output is
printed; otherwise the function is completely silent.
an integer, the number of random restarts.
a positive integer number, the length of the tabu list used in the
tabu
function.
a positive integer number, the iterations tabu search can perform without improving the best network score.
an integer, the number of attempts to randomly insert/remove/reverse an arc on every random restart.
an integer, the maximum number of iterations.
the maximum number of parents allowed for a node in any network
that is considered in the search, including that that is returned. The
default value is Inf
.
a boolean value. If TRUE
(the default), score caching
is used to speed up structure learning.
Marco Scutari
network scores
, constraint-based algorithms,
hybrid algorithms, local discovery algorithms,
alpha.star.