This is the official implementation of the following paper accepted to NeurIPS 2023 (spotlight):
Distributionally Robust Skeleton Learning of Discrete Bayesian Networks
Yeshu Li and Brian D. Ziebart
37th Conference on Neural Information Processing Systems (NeurIPS 2023)
- torch
- numpy
- scipy
- pandas
- pgmpy
- pyCausalFS
- causal-learn
- bnlearn
Download the data from bnlearn, BN Repository and Malone et al. or refer to the released data for the complete data adopted throughout our experiments.
python main.py --dataset data/cancer.bif --samples 1000 --noise noisefree --pnoise 0 --method dro_wass --epsilon 1 --threshold 0.1Call exp_mode_bif() or exp_mode_real() in main.py for benchmark data or real-world data respectively.
import drsl
import util
# data: <class 'pandas.core.frame.DataFrame'>
# method_name: 'dro_wass' | 'dro_kl' | 'reg_lr'
# epsilon: algorithm parameter
est_weight_mat = drsl.skeleton_learn(data, method_name, epsilon)
# thr: a chosen threshold to extract edges
est_skeleton = util.skel_by_threshold(est_weight_mat, thr)Please cite our work if you find it useful in your research:
@inproceedings{
li2023distributionally,
title={Distributionally Robust Skeleton Learning of Discrete Bayesian Networks},
author={Yeshu Li and Brian D Ziebart},
booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
year={2023},
url={https://openreview.net/forum?id=NpyZkaEEun}
}
This project is based upon work supported by the National Science Foundation under Grant No. 1652530.