https://github.com/genentech/dcdfg
https://github.com/genentech/dcdfg
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/genentech/dcdfg
- Owner: Genentech
- License: apache-2.0
- Created: 2022-09-28T00:58:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-04T14:06:27.000Z (over 3 years ago)
- Last Synced: 2024-09-26T02:01:40.251Z (over 1 year ago)
- Language: Python
- Size: 83 KB
- Stars: 21
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- top-pharma50 - **genentech/dcdfg** - 10-04 14:06:27 | (Ranked by starred repositories)
README
# Differentiable Causal Discovery with Factor Graphs
This repository contains an implementation of the structure learning method described in ["Large-Scale Differentiable Causal Discovery of Factor Graphs"](https://arxiv.org/abs/2206.07824).
If you find it useful, please consider citing:
```bibtex
@inproceedings{Lopez2022largescale,
author = {Lopez, Romain and Hütter, Jan-Christian and Pritchard, Jonathan K. and Regev, Aviv},
title = {Large-Scale Differentiable Causal Discovery of Factor Graphs},
booktitle = {Advances in Neural Information Processing Systems},
year = {2022},
}
```
## Requirements
Python 3.9+ is required. To install the requirements:
```setup
pip install -r requirements.txt
```
wandb is required for now (a PR to make remove this requirement is welcome). Follow the steps [here](https://docs.wandb.ai/quickstart).
## Running DCD-FG
### SEMs simulations (full usage in files)
1. 'python make_lowrank_dataset.py'
2. 'python run_gaussian.py'
### Biological dataset
1. 'perturb-cite-seq/0-data-download.ipynb'
1. 'perturb-cite-seq/1-assignments-vs-variability.ipynb'
2. 'python run_perturbseq_linear.py'
## Acknowledgments
- This repository was originally forked from [DCDI](https://github.com/slachapelle/dcdi). Please refer to the license file for more information.
- Most files in this codebase have been rewritten for:
1. vectorization and scaling to large graphs
2. incorporating the semantic of factor graphs
3. refactoring and implementation in pytorch lightning
4. implementation of DCD-FG, NOTEARS, NOTEARS-LR and NOBEARS
- We are grateful to the authors of the baseline methods for releasing their code.