5.4.2. pywhy_graphs.export.tetrad_to_graph#
- pywhy_graphs.export.tetrad_to_graph(filename: str, graph_type)[source]#
Convert a tetrad stored graph from a text file to causal graph in pywhy.
- Parameters:
filename : str
The file at which the tetrad file is stored.
graph_type : str
Type of pywhy causal graph to construct. One of (‘pag’, ‘cpdag’, ‘admg’, ‘dag’).
- Returns:
G : instance of causal graph
The causal graph.
Notes
See tetrad documentation: https://cmu-phil.github.io/tetrad/manual/.
Warning: There is no guarantee or check that your file adheres to the tetrad format.