GCN is an extended package built upon networkX and pgmpy for reconstructing causal connection by using Bayesian Network.
Clone the repository and add GCN folder into PYTHONPATH.
git clone https://github.com/haotianteng/GCN.git
cd GCN
pip install -r requirements.txt
export PYTHONPATH="$(pwd)/:$PYTHONPATH"
import numpy as np
from gcn import GaussianCausalNetwork
from networkx.generators.random_graphs import random_regular_graph
N_NODE = 5
G = random_regular_graph(d = 4, n = N_NODE)
weights = np.random.rand(N_NODE,N_NODE+2)
bn = GaussianCausalNetwork(G,weight_matrix = weights)