Background knowledge not used correctly?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 274
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I'm trying to provide a background graph to reduce the number of edges that I have to check when running PC. I'm doing this by setting forbidden edges in my BackgroundKnowledge object.
However, based on the code here: https://github.com/py-why/causal-learn/blob/main/causallearn/utils/PCUtils/SkeletonDiscovery.py#L100
it looks like the conditional independence test is being tested even when the pair of nodes is marked as 'forbidden'. Is this correct? Shouldn't this be completely skipped?
Because of this I see that my runtime for the naive (no background) is the same as the runtime for when I give a background graph, even when I use the FastBackgroundKnowledge object that was previously discussed (https://github.com/py-why/causal-learn/issues/142).
Thanks!
Contributor guide
No contributing guide indexed for this repository
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 at causallearn/utils/PCUtils/SkeletonDiscovery.py around line 100 and trace how forbidden edges from BackgroundKnowledge are handled before conditional independence tests run. Compare the behavior with FastBackgroundKnowledge discussed in issue #142, then confirm whether forbidden pairs should avoid testing and document the resulting runtime behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100