Description Usage Arguments Examples
This function allows you to learn a directed graph from a dataset using the Linear NO-TEARS algorithm.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | boot.notears(
df,
lambda1 = 0.1,
loss.type = c("l2", "logistic", "poisson"),
max.iter = 100,
h.tol = 1e-06,
rho.max = 1e+06,
w.threshold = 0.1,
R = 200,
m = NULL,
threshold = 0.5,
to = c("igraph", "adjacency", "edges", "graph", "bnlearn"),
cluster = parallel::detectCores(),
seed = sample(1:10^6, 1)
)
|
df |
Dataset. |
lambda1 |
L1 regularization parameter. Default: 0.1 |
loss.type |
Type of loss function to be used: 'l2', 'logistic', or 'poisson'. Default: 'l2' |
max.iter |
Maximum number of dual ascent steps. Default: 100 |
h.tol |
Minimum absolute value of h. Default: 1e-8 |
rho.max |
Maximum value of rho. Default: 1e+16 |
w.threshold |
Threshold of absolute value of weight. Default: 0.1 |
R |
Number of bootstrap replicates (optional). Default: 200 |
m |
Size of training set (optional). Default: nrow(df)/2 |
threshold |
Minimum strength required for a coefficient to be included in the average adjacency matrix (optional). Default: 0.5 |
to |
Output format ('adjacency', 'edges', 'graph', 'igraph', or 'bnlearn') (optional). |
cluster |
A cluster object from package parallel or the number of cores to be used (optional). Default: parallel::detectCores() |
seed |
Seed used for random selection. Default: NULL |
1 2 3 | obj <- boot.notears(df)
avg.g <- obj$average
g.rep <- obj$replicates
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.