Git Product home page Git Product logo

Comments (11)

amit-sharma avatar amit-sharma commented on June 4, 2024 2

Got it. Let me try to start the implementation with something simple and then maybe you can contribute.

from dowhy.

emrekiciman avatar emrekiciman commented on June 4, 2024 2

Yes, there is now a causal graph refutation functions that checks the independence constraints. This notebook includes an example usage (see Step 4):

"We can check if the assumptions of the graph hold true for the data using<br> `model.refute_graph(k, independence_test = {'test_for_continuous': 'partial_correlation', 'test_for_discrete' : 'conditional_mutual_information'})` <br>\n",

The documentation needs to be improved to make this easier to find.

from dowhy.

bloebp avatar bloebp commented on June 4, 2024 2

You can also take a look at: https://github.com/py-why/dowhy/blob/main/dowhy/gcm/validation.py#L24 and see the very recent discussion in #926. We are actually working on a new method there, hopefully can add this soon.

from dowhy.

amit-sharma avatar amit-sharma commented on June 4, 2024 1

Hey @fredthedead that's a great question. No, currently does not support it.
But this would be a great addition as a new refutation method. So given a causal model m, we can refute/test whether the dataset follows constraints from the causal model.

The trick is to find all falsifiable constraints that are entailed by a causal model. One methodic way is to consider all pairs, triplets and so on. Here's a start:

  1. Enumerate over all pairs (edges) and check for non-zero correlation with a statistical test.
  2. Enumerate all triplets in the graph, identify its type (path structure, confounder structure, collider structure, etc.) and then check whether the data follows expected correlation and independence constraints.

Pairs and triplets can be extended to quartets and so on. That said, it is still a heuristic because we leave out longer paths or nodes connected by more than 1-2 edges.

What do you think?

from dowhy.

fredthedead avatar fredthedead commented on June 4, 2024 1

Thanks for your reply @amit-sharma, much appreciated. The approach you describe is what I had in mind and was hoping it might of been implemented. I've started looking at the code a bit to estimate how much time it'll take me to add it, might give it a go next time I have some availability...

from dowhy.

eeulig avatar eeulig commented on June 4, 2024 1

Quick update regarding the novel refutation method mentioned by @bloebp. In #930 we added a function validate_lmc which tests the implied (conditional) independencies (via local Markov condition [LMC]) on some data (very similar to what @amit-sharma described). Additionally, we added a function falsify_graph to compare the result of this test to a baseline of random node-permutations to find whether the graph is significantly better than random. Here you can find an example notebook that highlights the key ideas and features of this function. We would greatly appreciate any feedback or comments! Please let me know if you have any questions!

from dowhy.

mauriciozuardi avatar mauriciozuardi commented on June 4, 2024

@amit-sharma @fredthedead was this implemented?

from dowhy.

amit-sharma avatar amit-sharma commented on June 4, 2024

Not yet unfortunately. Would you like to contribute @mauriciozuardi ?

from dowhy.

mauriciozuardi avatar mauriciozuardi commented on June 4, 2024

@amit-sharma I'm still familiarizing with the concepts (of causal analysis/inference) and the code, but as soon as I get confident enough I'll give it a try.

from dowhy.

arainboldt avatar arainboldt commented on June 4, 2024

Hi all, this is something that I e been looking for as well, and it seems that it would be a commonly used part of the causal analysis process. Any developments on this implementation?

from dowhy.

simon19891101 avatar simon19891101 commented on June 4, 2024

Much appreciated! @eeulig

from dowhy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.