Estimate the structure of a DAG (Bayesian network) from data. Works with any combination of discrete / continuous and observational / experimental data.
estimate.dag(
data,
lambdas = NULL,
lambdas.length = 20,
whitelist = NULL,
blacklist = NULL,
error.tol = 1e-04,
max.iters = NULL,
edge.threshold = NULL,
concavity = 2,
weight.scale = 1,
convLb = 0.01,
upperbound = 100,
adaptive = FALSE,
verbose = FALSE
)Data as sparsebnData.
(optional) Numeric vector containing a grid of lambda values (i.e. regularization parameters) to use in the solution path. If missing, a default grid of values will be used based on a decreasing log-scale (see also generate.lambdas).
Integer number of values to include in the solution path. If lambdas
has also been specified, this value will be ignored.
A two-column matrix of edges that are guaranteed to be in each
estimate (a "white list"). Each row in this matrix corresponds
to an edge that is to be whitelisted. These edges can be
specified by node name (as a character matrix), or by
index (as a numeric matrix).
A two-column matrix of edges that are guaranteed to be absent
from each estimate (a "black list"). See argument
"whitelist" above for more details.
Error tolerance for the algorithm, used to test for convergence.
Maximum number of iterations for each internal sweep.
Threshold parameter used to terminate the algorithm whenever the number of edges in the
current estimate has > edge.threshold edges. NOTE: This is not the same as alpha in
ccdr.run.
(CCDr only) Value of concavity parameter. If gamma > 0, then the MCP will be used
with gamma as the concavity parameter. If gamma < 0, then the L1 penalty
will be used and this value is otherwise ignored.
(CD only) A postitive number to scale weight matrix.
(CD only) Small positive number used in Hessian approximation.
(CD only) A large positive value used to truncate the adaptive weights. A -1 value indicates that there is no truncation.
(CD only) TRUE / FALSE, if TRUE the adaptive algorithm will be run.
TRUE / FALSE whether or not to print out progress and summary reports.
A sparsebnPath object.
For details on the underlying methods, see ccdr.run
and cd.run.
# NOT RUN {
# Estimate a DAG from the cytometry data
data(cytometryContinuous)
dat <- sparsebnData(cytometryContinuous$data, type = "c", ivn = cytometryContinuous$ivn)
estimate.dag(dat)
# }
Run the code above in your browser using DataLab