M-Nauta / TCDF

Temporal Causal Discovery Framework (PyTorch): discovering causal relationships between time series
GNU General Public License v3.0
482 stars 106 forks source link

Question: saving the causal graph #5

Closed LynetteGao closed 4 years ago

LynetteGao commented 4 years ago

Hi! I am wondering if there's option to save the resulting causal graph? Thanks

M-Nauta commented 4 years ago

Hi, Saving the graph can be easily done by adapting the function plotgraph in runTCDF.py which creates G, a networkx digraph. Documentation of networkx describes how to write the graph to a file. For example, saving the graph as a JSON file is described here.