You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to know if once the graph has been generated using DAGClassifier , is there a built-in mehod to export the structure of the graph, (edges, weight, nodes) in a column format so it can be visaulized using another custom tools?
Thank you
The text was updated successfully, but these errors were encountered:
qvhaelen
changed the title
Exporting graph structure in txt format
Exporting graph structure
Sep 2, 2021
We currently don't have a built-in export method. However, since StructureModel extends networkx.DiGraph (see here), you can use networkx's export method. For example, you can export to a .dot file using write_dot function:
importnetworkxasnxfromcausalnex.structureimportStructureModel# Create a modelsm=StructureModel()
sm.add_edges_from([
('A', 'C'),
('B', 'C'),
])
# Save the model into pygraphviz's dot formatnx.drawing.nx_pydot.write_dot(sm, 'graph.dot')
To export to other formats, you can find out more from networkx's documentation. Hope this helps :)
Dear @oentaryorj thank you for the information. Yes I am already using the networkx functionalities so I guess it should be ok to export graph using networkx exprot function without relying on pygraphiz
Hello,
I would like to know if once the graph has been generated using DAGClassifier , is there a built-in mehod to export the structure of the graph, (edges, weight, nodes) in a column format so it can be visaulized using another custom tools?
Thank you
The text was updated successfully, but these errors were encountered: