You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changed default identification behavior with unobserved variables (#354)
Earlier, DoWhy would automatically add an unobserved variable, but it created confusion.
New behavior:
DoWhy does not add an unobserved variable. User has to provide it.
Identification proceeds as per user-provided graph. Simplified code.
* proceed_when_unidentifiable is redundant. Will be removed in a future version.
* fixed some identification errors with unobserved variables
* removed unobserved c from default graph of datasets.py
* fixed some notebook errors
* added error messages when identification has failed
Copy file name to clipboardexpand all lines: docs/source/example_notebooks/dowhy_example_effect_of_memberrewards_program.ipynb
+1-3
Original file line number
Diff line number
Diff line change
@@ -210,7 +210,7 @@
210
210
"1. Activity prior to the treatment (assumed a cause of the treatment)\n",
211
211
"2. Activity after the treatment (is the outcome of applying treatment)\n",
212
212
"\n",
213
-
"Of course, many important variables that affect signup and total spend are missing (e.g., the type of products bought, length of a user's account, geography, etc.). So we'll need a node denoting `Unobserved Confounders`. \n",
213
+
"Of course, many important variables that affect signup and total spend are missing (e.g., the type of products bought, length of a user's account, geography, etc.). This is a critical assumption in the analysis, one that needs to be tested later using refutation tests. \n",
214
214
"\n",
215
215
"Below is the causal graph for a user who signed up in month `i=3`. The analysis will be similar for any `i`. "
216
216
]
@@ -271,12 +271,10 @@
271
271
"pre_spends;\n",
272
272
"post_spends;\n",
273
273
"Z->treatment;\n",
274
-
"U[label=\"Unobserved Confounders\"]; \n",
275
274
"pre_spends -> treatment;\n",
276
275
"treatment->post_spends;\n",
277
276
"signup_month->post_spends;\n",
278
277
"signup_month->treatment;\n",
279
-
"U->treatment; U->pre_spends; U->post_spends;\n",
280
278
"}\"\"\"\n",
281
279
"\n",
282
280
"# Post-process the data based on the graph and the month of the treatment (signup)\n",
self.logger.warning("If this is observed data (not from a randomized experiment), there might always be missing confounders. Causal effect cannot be identified perfectly.")
390
-
response=False# user response
391
-
ifproceed_when_unidentifiable:
392
-
self.logger.info(
393
-
"Continuing by ignoring these unobserved confounders because proceed_when_unidentifiable flag is True."
394
-
)
395
-
else:
396
-
response=cli.query_yes_no(
397
-
"WARN: Do you want to continue by ignoring any unobserved confounders? (use proceed_when_unidentifiable=True to disable this prompt)",
398
-
default=None
399
-
)
400
-
ifresponseisFalse:
401
-
self.logger.warn("Identification failed due to unobserved variables.")
0 commit comments