Skip to content

fix: correctly implement meek closure for PDAGs#250

Merged
frederikfabriciusbjerre merged 2 commits intofrederikfabriciusbjerre:mainfrom
jolars:pdag-meek-closure
Mar 18, 2026
Merged

fix: correctly implement meek closure for PDAGs#250
frederikfabriciusbjerre merged 2 commits intofrederikfabriciusbjerre:mainfrom
jolars:pdag-meek-closure

Conversation

@jolars
Copy link
Copy Markdown
Collaborator

@jolars jolars commented Mar 16, 2026

This PR fixes a bug where to_cpdag on PDAG inputs was a no-op clone instead of applying Meek-rule closure; PDAGs now get real orientation.

It also refactors Meek logic into a shared Rust helper (graph::alg::meek) so both DAG->CPDAG and PDAG->CPDAG use the same closure engine.

I found this while going over the pgmpy tests. (coming up in separate PR).

Our current behavior is essentially a no-op and actually does not really
work.
jolars added a commit to jolars/caugi that referenced this pull request Mar 17, 2026
I've analyzed the test set from pgmpy and tried to fill some gaps. I
didn't discover any bugs other than the one in frederikfabriciusbjerre#250.
jolars added a commit to jolars/caugi that referenced this pull request Mar 17, 2026
I've analyzed the test set from pgmpy and tried to fill some gaps. I
didn't discover any bugs other than the one in frederikfabriciusbjerre#250.
Copy link
Copy Markdown
Owner

@frederikfabriciusbjerre frederikfabriciusbjerre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mighty fine!

@frederikfabriciusbjerre frederikfabriciusbjerre merged commit 482b90f into frederikfabriciusbjerre:main Mar 18, 2026
9 checks passed
@jolars jolars deleted the pdag-meek-closure branch March 30, 2026 07:09
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

Successfully merging this pull request may close these issues.

2 participants