Comments (10)
Thanks for checking @rahulbshrestha Looks like this issue is resolved in the current version. We can close this issue.
from dowhy.
Great suggestion. We might need a broader overhaul of logging and exception handling. What do you think @amit-sharma ?
from dowhy.
Is this error caused when calling the 'CausalModel()' when it internally creates the graph through the 'CausalGraph()' API or somewhere else? because I am not able to reproduce the error locally.
from dowhy.
I think this error is raised when you input your own graph as a string and forget to add all required nodes. So if you provide a dot graph with missing nodes, and then call CausalModel with that graph, it should throw this error.
from dowhy.
Hi! I'm unsure if it persists since I'm not currently using the library. But the point was that the error message didn't help as much as it could in identifying what the missing nodes were.
from dowhy.
Hey @amit-sharma! I would like to help out in fixing this bug. Can you let me know what kind of error message do you expect?
from dowhy.
thanks for contributing, @rahulbshrestha It will be nice to output an error message that describes the source of the bug. Something like, "Some nodes are missing in the graph: {node1name, node2name} "
from dowhy.
I can't seem to reproduce this issue, how can I provide a dot graph with missing nodes such that the KeyError appears?
Experimenting with this:
# With DOT string
model=CausalModel(
data = df,
treatment='X',
outcome='Y',
graph="digraph {Z -> X;Z -> Y;X -> Y;}"
)
model.view_model()
where, df consists of X,Y and Z as columns.
I'm not sure if @lgmoneda meant in this case
# With GML string
model=CausalModel(
data = df,
treatment='X',
outcome='Y',
graph="""graph[directed 1 node[id "Z" label "Z"]
node[id "X" label "X"]
#node[id "Y" label "Y"]
edge[source "Z" target "X"]
edge[source "Z" target "Y"]
edge[source "X" target "Y"]]"""
)
model.view_model()
where an NetworkXError: edge #1 has undefined target 'Y'
error is thrown if we remove the node Y.
from dowhy.
Try this. Does the following code raise the error?
model=CausalModel(
data = df,
treatment='X',
outcome='Y',
graph="digraph {Z -> X;}"
)
model.view_model()
from dowhy.
from dowhy.
Related Issues (20)
- how to use the function of estimate_effect of CausalModel class? HOT 4
- gcm.arrow_strength providing different ranking HOT 6
- 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 8
- Feature relevance/Influence HOT 19
- Graphviz installation : --include-path not recognized anymore HOT 4
- Does this package support non-English languages? HOT 2
- Question about Dummy Outcome Refuter HOT 1
- 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
- Refutation & Overlap Error ("data_subset_refuter", "add_unobserved_common_cause", assess_support_and_overlap_overrule)
- No Backdoor Path Available
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.