<div align="center">    
 
# Learning DAGs from Fourier-Sparse Data.

</div>
 
## Description   
We leverage recent causal Fourier analysis to pose the novel problem of learning DAGs from data with sparse spectrum and propose a solution that has better performance over existing DAG learning methods. 


## Installation 
Current version of the code was run successfully in Windows 11 with python 3.9.7.

Make sure to have R installed and that the path to the R directory in file experiment.py is correct. Also note the required packages on R for the [causal discovery toolbox](https://fentechsolutions.github.io/CausalDiscoveryToolbox/html/index.html).

Then create the following environment on python:
```bash
# create a new conda environment
conda create -n moebius python=3.9.7
conda activate moebius

# install all requirements with pip
pip install -r requirements.txt
```
Special care must be taken for installing the pycausal package.
We suggest the following procedure.
```bash
# clone and install py-causal package
git clone https://github.com/bd2kccd/py-causal
cd py-causal
python setup.py install

# install pydot with conda
conda install pydot
```

## Execution   
```bash
# run all experiments
bash run.sh
```