Learn R Programming

bnlearn (version 1.1)

gs: Grow-Shrink (GS) learning algorithm

Description

Estimate the equivalence class of a directed acyclic graph (DAG) from data using the Grow-Shrink (GS) constraint-based algorithm.

Usage

gs(x, cluster = NULL, whitelist = NULL, blacklist = NULL,
    test = NULL, alpha = 0.05, debug = FALSE, optimized = TRUE,
    strict = FALSE, undirected = FALSE, direction = FALSE)

Arguments

x
a data frame, containing the variables in the model.
cluster
an optional cluster object from package snow. See snow integration for details and a simple example.
whitelist
a data frame with two columns (optionally labeled "from" and "to"), containing a set of arcs to be included in the graph.
blacklist
a data frame with two columns (optionally labeled "from" and "to"), containing a set of arcs not to be included in the graph.
test
a character string, the label of the conditional independence test to be used in the algorithm. Possible values are mi (mutual information for discrete data), fmi (fast mutual information),
alpha
a numerical value, the target nominal type I error rate.
debug
a boolean value. If TRUE a lot of debugging output is printed; otherwise the function is completely silent.
optimized
a boolean value. See bnlearn-package for details.
strict
a boolean value. If TRUE conflicting results in the learning process generate an error; otherwise they result in a warning.
undirected
a boolean value. If TRUE no attempt will be made to determine the orientation of the arcs; the returned (undirected) graph will represent the underlying structure of the Bayesian network.
direction
a boolean value. If TRUE (and undirected is set to FALSE) each possible direction of each undirected arc is tested, and the one with the lowest p-value is accepted as the true direction for that a

Value

  • An object of class bn. See bn-class for details.

References

D. Margaritis. Learning Bayesian Network Model Structure from Data. PhD thesis, School of Computer Science, Carnegie-Mellon University, Pittsburgh, PA, May 2003. Available as Technical Report CMU-CS-03-153.

See Also

iamb, fast.iamb, inter.iamb, mmpc, hc.