py-why / py-why/causal-learn

Understanding the FCI outputs (graph vs. printed edges)

Open
#180 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.7k
Forks
274
PR merge metrics
No merged PRs in 30d

Description

I apologize if this is a naive question, but I want to ask. In my PAG resulting from FCI, I see that X4 --> X5 relationship is observed in the graph. But, the printed relationships between edges and nodes as a result of running FCI algorithm, does not include the same path that is in the PAG graph. How should I interpret this? Thank you.

from causallearn.search.ConstraintBased.FCI import fci
from causallearn.utils.GraphUtils import GraphUtils
g, edges = fci(df.to_numpy())
pdy = GraphUtils.to_pydot(g )

Edit: Updated PAG, g.graph, and edges. This time FCI outputs X1 --> X5 and X2 --> X3. But in the PAG, we can see X4 --> X5, X2 --> X5, X6 --> X5, etc. as well.

Screenshot 2024-04-28 223323

g.graph:

image

edges:
image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the FCI call in the issue and the GraphUtils.to_pydot(g) entry point, then inspect how the returned graph and edges values are represented. Compare the PAG rendering with the printed edge collection and document the distinction and how users should interpret each output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.