-
Notifications
You must be signed in to change notification settings - Fork 18
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
[ENH; WIP] Implementation of FCI algorithm that leverages the base classes used in PC #32
Conversation
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Just want to mention that if we start supporting causal-learn (which we plan to), we should probably not have another implementation of the most common algorithms. However, I see the benefit here to demonstrate the API and graph usages. That being said, maybe we should look into having wrappers to support calling the causal-learn functions. This could be as simple as:
There is no need to have the graph definitions deeply integrated in the algorithms. |
That sounds good. I'm motivated to implement at least the core constraint-based algos. in this repo and codebase because of a few reasons: i) extensibility: rn I am trying to get an implementation of rFCI working w/o having to use the R package pcalg. In the proposed constraint-based API, I think it's important to modularize and pull apart each aspect of the core algorithms to enable future improvements. E.g. rFCI, or even conservativeFCI, or maxvoteFCI is trivially implementable by subclassing Of course... this all relies on me being invested in constraint-based learning :p. I think if there is developer consensus on the API, then re-implementing will be helpful in the long run to consolidate the API across the entire pywhy. With that being said, I am less motivated to do the score-based algorithms, which I think then implementing a wrapper sounds like a great way of getting the functionality out right away. E.g. #29 |
For this comment: are you referring to the lines here dodiscover/dodiscover/constraint/_classes.py Lines 119 to 123 in 3c4f8d2
or dodiscover/dodiscover/constraint/pcalg.py Lines 197 to 200 in ab79e40
If the former, then agreed it's quite hidden. Rn I convert to the class, but that's because I need the explicit object to "orient edges" in the PC/FCI orientation phase. I think we've discussed the issue of assuming a numpy array vs an actual object in the internals of the algo. I think there are equally the same issues of converting any graph object to numpy array as converting a numpy array to a graph object before running the algos. But if we eventually can push I think one way to make this more transparent and modularizable is to allow the user to optionally pass in a graph function that allows |
I was rather referring to providing wrappers instead of re-implementing the algorithms (as discussed offline). That was rather meant as a pseudo-code to show that we can simply call external libraries and convert their result into our objects. |
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Changes proposed in this pull request:
LearnSkeleton
for learning skeleton graphs using the idea of "possibly-d-separating" sets and "PDS-Path" sets (see RFCI paper)Next PR:
This relies on Pywhy-graph changes in: py-why/pywhy-graphs#10
Also this will be downstream of #30 .
Order of merging:
Before submitting
section of the
CONTRIBUTING
docs.Writing docstrings section of the
CONTRIBUTING
docs.After submitting