NO TEARS non-linear (gCastle)

Module name

gcastle_notears_nonlinear

Package

gCastle

Version

1.0.3

Language

Python

Docs

here

Paper

Zheng et al.[1]

Graph type

DAG

MCMC

No

Edge constraints

No

Data type

C

Data missingness

Intervention type

Docker

bpimages/gcastle:1.0.3

NO TEARS non-linear

Notears Nonlinear. Include notears-mlp and notears-sob. A gradient-based algorithm using neural network or Sobolev space modeling for non-linear causal relationships.

Example

Config file: gcastle_nonlinear.json

Command:

snakemake --cores all --use-apptainer --configfile config/gcastle_nonlinear.json

Fig. 48 and Fig. 49 show the pattern graph’s FP/P vs. TP/P benchmark results for gCastle algorithms, and comparison with BOSS (TETRAD) and Iterative MCMC (BiDAG), tested on nonlinear data. The benchmark is based on 5 datasets corresponding to 5 realisations of a 20-variable random nonlinear Gaussian SEM with Erdős-Rényi structure (expected degree 4, max parents 5). The nonlinear relationships are modeled using multi-layer perceptrons (MLP) and quadratic functions, see gcastle_iidsim. Each dataset contains 300 standardized samples. The SEM parameters are uniformly sampled from [0.25, 1].

FP/P vs. TP/P for gCastle algorithms on nonlinear MLP data

Fig. 48 FP/P vs. TP/P for gCastle algorithms on nonlinear MLP data.

FP/P vs. TP/P for gCastle algorithms on nonlinear quadratic data

Fig. 49 FP/P vs. TP/P for gCastle algorithms on nonlinear quadratic data.

Example JSON

[
  {
    "id": "gcastle_notears_mlp",
    "lambda1": 0.01,
    "lambda2": 0.01,
    "max_iter": 100,
    "h_tol": "1e-8",
    "rho_max": "1e+16",
    "w_threshold": 0.3,
    "bias": true,
    "model_type": "mlp",
    "device_type": "cpu",
    "device_ids": null,
    "timeout": null
  },
  {
    "id": "gcastle_notears_sob",
    "lambda1": 0.01,
    "lambda2": 0.01,
    "max_iter": 100,
    "h_tol": "1e-8",
    "rho_max": "1e+16",
    "w_threshold": 0.3,
    "bias": true,
    "model_type": "sob",
    "device_type": "cpu",
    "device_ids": null,
    "timeout": null
  }
]