Comments (11)
Got it. Let me try to start the implementation with something simple and then maybe you can contribute.
from dowhy.
Yes, there is now a causal graph refutation functions that checks the independence constraints. This notebook includes an example usage (see Step 4):
The documentation needs to be improved to make this easier to find.
from dowhy.
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.
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:
- Enumerate over all pairs (edges) and check for non-zero correlation with a statistical test.
- 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.
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.
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.
@amit-sharma @fredthedead was this implemented?
from dowhy.
Not yet unfortunately. Would you like to contribute @mauriciozuardi ?
from dowhy.
@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.
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.
Much appreciated! @eeulig
from dowhy.
Related Issues (20)
- conda release 0.11.1 is missing HOT 1
- File Not Found error in Jupyter Notebook when i use auto.assign_causal_mechnism HOT 8
- buggidy giggidy
- Counterfactual Reasoning with Categorical Variables HOT 3
- Time complexity of constructing cause-and-effect diagram HOT 3
- Support polars data frames HOT 2
- What is the purpose of providing observation data in gcm.conventional_samples()?
- Python 3.12 support HOT 3
- Clarify the differences among refute methods HOT 9
- Feature relevance/Influence HOT 21
- Graphviz installation : --include-path not recognized anymore HOT 4
- Does this package support non-English languages? HOT 3
- Question about Dummy Outcome Refuter HOT 2
- Inconsistency in the placebo_treatment_refuter when using estimate_effect of IV HOT 1
- numpy.dual is dropped but it still occurs in dowhy HOT 2
- NetworkXError: graph should be directed acyclic HOT 2
- Refutation & Overlap Error ("data_subset_refuter", "add_unobserved_common_cause", assess_support_and_overlap_overrule) HOT 1
- No Backdoor Path Available
- Clarification on how to use gcm properly for confounders adjustment HOT 3
- Can you provide code demo for each function? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dowhy.