Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues in DAG.cpdag() #4

Open
kenneth-lee-ch opened this issue Mar 7, 2025 · 0 comments
Open

Issues in DAG.cpdag() #4

kenneth-lee-ch opened this issue Mar 7, 2025 · 0 comments

Comments

@kenneth-lee-ch
Copy link

I tried the following code

from graphical_models.classes.dags.dag import DAG

arcs = {(0, 5), (0, 8), (2, 0),(3, 6),(5, 4),(5, 7),(6, 0),(7, 1),(7, 4),(9, 5),(9, 6),(9, 8)}
g = DAG(arcs=arcs)
cg = g.cpdag()
print(cg.edges)

Then, I get the following

{frozenset({4, 7})}

According to my understanding, .edges returns all undirected edges in a CPDAG. How come this is the case? I also see that cg.arcs does not contain (7, 4).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant