Description Usage Arguments Details Value Examples
Estimate a Bayesian network (directed acyclic graph) from observational data using the CCDr algorithm as described in Aragam and Zhou (2015), JMLR.
1 2 |
data |
Data matrix. Must be numeric and contain no missing values. |
betas |
Initial guess for the algorithm. Represents the weighted adjacency matrix of a DAG where the algorithm will begin searching for an optimal structure. |
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 |
gamma |
Value of concavity parameter. If |
error.tol |
Error tolerance for the algorithm, used to test for convergence. |
max.iters |
Maximum number of iterations for each internal sweep. |
alpha |
Threshold parameter used to terminate the algorithm whenever the number of edges in the
current estimation is |
verbose |
|
Instead of producing a single estimate, this algorithm computes a solution path of estimates based
on the values supplied to lambdas
or lambdas.length
. The CCDr algorithm approximates
the solution to a nonconvex optimization problem using coordinate descent. Instead of AIC or BIC,
CCDr uses continuous regularization based on concave penalties such as the minimax concave penalty
(MCP).
This implementation includes two options for the penalty: (1) MCP, and (2) L1 (or Lasso). This option
is controlled by the gamma
argument.
A ccdrPath-class
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
### Generate some random data
dat <- matrix(rnorm(1000), nrow = 20)
### Run with default settings
ccdr.run(data = dat)
### Optional: Adjust settings
pp <- ncol(dat)
init.betas <- matrix(0, nrow = pp, ncol = pp) # initialize algorithm with a random initial value
init.betas[1,2] <- init.betas[1,3] <- init.betas[4,2] <- 1 #
ccdr.run(data = dat, betas = init.betas, lambdas.length = 10, alpha = 10, verbose = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.