6.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:
- filenamestr
The file at which the tetrad file is stored.
- graph_typestr
Type of pywhy causal graph to construct. One of (‘pag’, ‘cpdag’, ‘admg’, ‘dag’).
- Returns:
- Ginstance 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.