https://github.com/marrlab/causalspyne
Python data generation tool with unobserved confounding as testbed for causal discovery and causal abstraction
https://github.com/marrlab/causalspyne
Last synced: over 1 year ago
JSON representation
Python data generation tool with unobserved confounding as testbed for causal discovery and causal abstraction
- Host: GitHub
- URL: https://github.com/marrlab/causalspyne
- Owner: marrlab
- Created: 2024-08-06T11:02:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-19T14:58:48.000Z (over 1 year ago)
- Last Synced: 2025-03-29T12:16:49.256Z (over 1 year ago)
- Language: Python
- Homepage: https://pypi.org/project/causalspyne/
- Size: 755 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CausalSpyne
[](https://badge.fury.io/py/causalspyne) [](https://marrlab.github.io/causalspyne/)
A Python package for simulating data from confounded causal models.
## Quick start
Install with: `pip install causalspyne`
Generate some data:
```
from causalspyne import gen_partially_observed
gen_partially_observed(size_micro_node_dag=4,
num_macro_nodes=4,
degree=2, # average vertex/node degree
list_confounder2hide=[0.5, 0.9], # choie of confounder to hide: percentile or index of all toplogically sorted confounders
num_sample=200,
output_dir="output",
rng=0)
```
## Submodules
```
git submodule update --init
```