GithubHelp home page GithubHelp logo

baosws / cdci Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 19.74 MB

Conditional Divergence based Causal Inference (CDCI) - CLeaR 2022

Home Page: https://openreview.net/forum?id=8X6cWIvY_2v

Python 100.00%
causal-discovery conditional-divergence causal-inference clear2022

cdci's Introduction

Conditional Divergence based Causal Inference

This is the implementation of our paper: Bao Duong and Thin Nguyen. Bivariate causal discovery via conditional divergence. In First Conference on Causal Learning and Reasoning, 2022.

Dependencies

Step-by-step installation:

conda create -n CDCI -c conda-forge python=3 numpy pandas scikit-learn
conda activate CDCI
pip install cdt

Data

Data sources:

Data is prepared in the following structure:

  • Location: "data/{dataset name}.csv". Data set names should be CE-Cha, CE-Net, CE-Gauss, CE-Multi, D4S1, D4S2A, D4S2B, or D4S2C.
  • Each data set should have at least 4 columns: SampleID, A, B, and Target.

Usage:

python CDCI.py [-h] [--methods METHODS [METHODS ...]] [--datasets DATASETS [DATASETS ...]] [--maxdev MAXDEV] [--out PATH] [--hyper]

optional arguments:
  -h, --help            show this help message and exit
  --methods METHODS [METHODS ...], -m METHODS [METHODS ...]
                        Applicable methods: ANM, CDS, IGCI, RECI, CCS, CHD, CKL, CKM, CTV. [Default: All methods]
  --datasets DATASETS [DATASETS ...], -d DATASETS [DATASETS ...]
                        Available data sets: CE-Cha, CE-Gauss, CE-Net, CE-Multi, D4S1, D4S2A, D4S2B, and D4S2C. [Default: All data sets]
  --maxdev MAXDEV       Discretization parameter
  --out PATH, -o PATH   Output file
  --hyper               Test hyperparameters

Examples:

  • Run CDCI methods on CE-Net and CE-Cha datasets:
python CDCI.py -m CCS CHD CKL CKM CTV -d CE-Net CE-Cha
  • Evaluate hyperparameters for CDCI on real datasets:
python CDCI.py -m CCS CHD CKL CKM CTV -d D4S1 D4S2A D4S2B D4S2C --hyper

Citation

If this code helps in your work, please consider citing us as:

@inproceedings{duong2022bivariate,
  title={Bivariate causal discovery via conditional divergence},
  author={Duong, Bao and Nguyen, Thin},
  booktitle={Conference on Causal Learning and Reasoning},
  pages={236--252},
  year={2022},
  organization={PMLR}
}

cdci's People

Contributors

baosws avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.