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

Background knowledge not used correctly? #171

Open
patfl84 opened this issue Mar 5, 2024 · 1 comment
Open

Background knowledge not used correctly? #171

patfl84 opened this issue Mar 5, 2024 · 1 comment

Comments

@patfl84
Copy link

patfl84 commented Mar 5, 2024

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 (#142).

Thanks!

@kunwuz
Copy link
Collaborator

kunwuz commented Mar 11, 2024

Hi, thanks for your interest and question! The current implementation for incorporating background knowledge mainly focuses on fine-tuning the result instead of speeding up the search procedure, since achieving the latter while preserving the correctness of the result might not be straightforward (e.g., forcing a model to choose a specific edge might influence other edges). However, I do think that background should be helpful in some cases. We will work on it, and, at the same time, please feel free to propose any changes :)

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

No branches or pull requests

2 participants