pywhy_graphs.algorithms.dag_to_mag#

pywhy_graphs.algorithms.dag_to_mag(G, L: Set | None = None, S: Set | None = None)[source]#

Converts a DAG to a valid MAG.

The algorithm is defined in [1] on page 1877.

Returns:
magGraph

The MAG.