mschauer / mschauer/CausalInference.jl
Give the option to use the stable version of the PC
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 212
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
In the README.md and Docs it says that pcalg implements the stable PC algorithm.
I might be missing something but to me the implementation looks like the standard PC.
The difference in the skeleton phase between standard PC and stable PC is in the following line (screenshots from https://jmlr.org/papers/volume15/colombo14a/colombo14a.pdf).
Standard PC:
Stable PC:
Difference is summarized here:
In skeleton we have:
https://github.com/mschauer/CausalInference.jl/blob/2aadc813bd3e0c10186349f85fe5b01d598bebe3/src/skeleton.jl#L40
Which always extracts the latest neighbor set at each step, not only after each update of d (or l in Colombo and Maathuis notation).
It is then used here for forming set S:
https://github.com/mschauer/CausalInference.jl/blob/2aadc813bd3e0c10186349f85fe5b01d598bebe3/src/skeleton.jl#L45
So as far as I understand, one would need to either copy the graph at the start of the while true loop and use that for extracting the neighbors or not remove edges directly but store the to-be-deleted edges temporarily and remove them at the d = d+1 line.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/skeleton.jl, especially the while loop and the neighbor-set and set-S logic linked in the issue. Compare that behavior with the standard and stable PC descriptions, then define how callers select each version. Done means the stable version is available without removing the existing behavior, with README.md and Docs describing the option and its semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100