Skip to content

Commit

Permalink
partially implemented the function
Browse files Browse the repository at this point in the history
Signed-off-by: Aryan Roy <[email protected]>
  • Loading branch information
aryan26roy committed Nov 16, 2023
1 parent 168ad5d commit d056b43
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pywhy_graphs/algorithms/pag.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
import numpy as np

from pywhy_graphs import ADMG, CPDAG, PAG, StationaryTimeSeriesPAG
from pywhy_graphs.algorithms.generic import single_source_shortest_mixed_path
from pywhy_graphs.algorithms.generic import single_source_shortest_mixed_path, valid_mag
from pywhy_graphs.typing import Node, TsNode

from dodiscover.constraint.fcialg import FCI
from dodiscover.ci import Oracle

logger = logging.getLogger()

__all__ = [
Expand Down Expand Up @@ -1193,4 +1196,13 @@ def valid_pag(G: PAG):
is_valid : bool
The MAG constructed from the PAG.
"""

# check if the graph is a vald PAG
converted_mag = pag_to_mag(G)
valid_mag = valid_mag(converted_mag)

# convert the mag back to a pag

# check if the converted pag is equivalent to the original

return True

0 comments on commit d056b43

Please sign in to comment.