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

Added a PartialOrder transform #444

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

velochy
Copy link

@velochy velochy commented Mar 31, 2025

This is an implementation of a partial order transform as discussed in https://discourse.pymc.io/t/feature-proposal-poset-order-transform/16753/7

I have tried to make it as generic as possible:

  • It takes only the generating DAG and computes the transitive reduction
  • It does not assume the DAG is given in topological order but instead handles sorting internally
  • It converts the matrix to an adjacency list of incoming nodes, reducing computation for low-degree orders
  • It can either take one single DAG for all data or allows specifying a separate DAG for each row

As I am new to contributing to both pymc and pymc-extras, I will likely need some help to get it acceptable.
So far, I have added the code and tests for it, but I don't know how to handle documentation yet.
Also anything else that might need to happen before this can be merged.

@velochy
Copy link
Author

velochy commented Apr 1, 2025

Added to documentation too now. Please let me know if anything needs doing/improving

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.

1 participant