estimate.dag: Estimate a DAG from data

Description Usage Arguments Details Value Examples

View source: R/sparsebn-main.R

Description

Estimate the structure of a DAG (Bayesian network) from data. Works with any combination of discrete / continuous and observational / experimental data.

Usage

1
2
3
4
5
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)

Arguments

data

Data as sparsebnData.

lambdas

(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).

lambdas.length

Integer number of values to include in the solution path. If lambdas has also been specified, this value will be ignored.

whitelist

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).

blacklist

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.tol

Error tolerance for the algorithm, used to test for convergence.

max.iters

Maximum number of iterations for each internal sweep.

edge.threshold

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.

concavity

(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.

weight.scale

(CD only) A postitive number to scale weight matrix.

convLb

(CD only) Small positive number used in Hessian approximation.

upperbound

(CD only) A large positive value used to truncate the adaptive weights. A -1 value indicates that there is no truncation.

adaptive

(CD only) TRUE / FALSE, if TRUE the adaptive algorithm will be run.

verbose

TRUE / FALSE whether or not to print out progress and summary reports.

Details

For details on the underlying methods, see ccdr.run and cd.run.

Value

A sparsebnPath object.

Examples

1
2
3
4
# Estimate a DAG from the cytometry data
data(cytometryContinuous)
dat <- sparsebnData(cytometryContinuous$data, type = "c", ivn = cytometryContinuous$ivn)
estimate.dag(dat)

itsrainingdata/sparsebn documentation built on Sept. 8, 2020, 3:15 a.m.