notears: Linear NO-TEARS Algorithm (Reimplemented)

Description Usage Arguments Examples

View source: R/algorithms.R

Description

This function allows you to learn an adjacency matrix from a dataset using the Linear NO-TEARS algorithm.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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,
  m = NULL,
  to = c("igraph", "adjacency", "edges", "graph", "bnlearn"),
  seed = sample(1:10^6, 1)
)

Arguments

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

m

Size of training set (optional). Default: nrow(df)/2

to

Output format ('adjacency', 'edges', 'graph', 'igraph', or 'bnlearn') (optional).

Examples

1
g <- notears(df)

rlebron-bioinfo/gnlearn documentation built on July 25, 2020, 12:38 p.m.