causal-learn icon indicating copy to clipboard operation
causal-learn copied to clipboard

Understanding the FCI outputs (graph vs. printed edges)

Open mozolcer opened this issue 1 year ago • 3 comments

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

mozolcer avatar Apr 19 '24 01:04 mozolcer

Thanks for your interest. Could you please share the complete g.graph and edges?

kunwuz avatar Apr 19 '24 16:04 kunwuz

Thanks for your interest. Could you please share the complete g.graph and edges?

I couldn't reproduce the same the graph, so I updated the post with the new graph, corresponding g.graph and edges. Thank you

mozolcer avatar Apr 29 '24 02:04 mozolcer

Thanks. It seems that the returned graph is consistent with the visualization. Maybe the printed information is not complete, let us check this soon.

kunwuz avatar Apr 29 '24 16:04 kunwuz