FenTechSolutions / CausalDiscoveryToolbox

Package for causal inference in graphs and in the pairwise settings. Tools for graph structure recovery and dependencies are included.
https://fentechsolutions.github.io/CausalDiscoveryToolbox/html/index.html
MIT License
1.08k stars 198 forks source link

Why am I getting full graph as discovery result? #135

Open kn0xit opened 2 years ago

kn0xit commented 2 years ago

Hello!

I am exploring your Causal Discovery Toolbox, and I am having some issues at the very start.

I.e., when I run the SAM example code outlined in the documentation, I receive a full undirected graph (all nodes connected to every other node) as a result. This seems odd, of course, as it is equivalent to the input. I adopted the example without any changes.

SAM example here: https://fentechsolutions.github.io/CausalDiscoveryToolbox/html/causality.html#sam

Am I approaching this the wrong way?

Thanks for your help!

diviyank commented 2 years ago

Hello,

Linked to #116 and others

Long story short : SAM actually provides a graph with a confidence score for each edge ; so you need to filter out the low weight value edges to have a reasonable solution. Maybe a should add a threshold parameter...

Hope this helps, Diviyan