Codes for "Efficient Sampling on Directed Graphs via Gershgorin Disc Alignment."
Please ensure conda
(alternatively miniconda
) has been installed.
- Create environment.
$ conda create -n gda python=3.8
- Install requirements.
$ conda activate gda
$ cd <path-to-this-repo>/GDADirect
$ pip install -r requirements.txt
If the above installtion fails, one should manually install required packages as follows:
$ pip install intel-numpy==1.21.4 intel-scipy==1.7.3 matplotlib==3.6.1 cvxopt==1.3.0 networkx==2.8.7
Note:
numpy
andscipy
in our environment is based onmkl
by Intel. Those based onOpenBLAS
orBLAS
may produce different results in terms of running time.- Our experiments are conducted on Ubuntu 18.04. Results on other operation systems, e.g., Windows 10, can be different.
- Reconstruction MSE experiments
# low pass signal
python recon_mse_exp.py --size=200 --g_type=random --s_type=lowpass --topk_ratio=0.1 --k_start=10 --k_end=60 --k_step=10 --graph_rep=5 --sig_rep=3000 --sigma=0.0 --mu=0.001 --para=20 --epr=0.01
# GMRF signal
python recon_mse_exp.py --size=200 --g_type=random --s_type=normal --omega=0.1 --k_start=10 --k_end=60 --k_step=10 --graph_rep=5 --sig_rep=3000 --sigma=0.0 --mu=0.001 --para=20
# Diffusion signal
python recon_mse_exp.py --size=200 --g_type=random --s_type=diffusion --T=50 --alpha=0.1 --k_start=10 --k_end=60 --k_step=10 --graph_rep=5 --sig_rep=3000 --sigma=0.0 --mu=0.001 --para=20 --epr=0.01
Note that some hyper-parameters, e.g., epr
, should be fine-tuned for the best results.
- Running time experiments
python runtime_exp.py --n_list 100 200 300 400 500 600 700 800 --k_ratio=0.3 --graph_rep=5 --mu=0.001 --p=0.1