py-why / dowhy

DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions. DoWhy is based on a unified language for causal inference, combining causal graphical models and potential outcomes frameworks.

Home Page:https://www.pywhy.org/dowhy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hanging when refuting right after calculating confidence interval

whikwon opened this issue · comments

I encountered a problem in the the tutorial notebook when I calculate the confidence interval(CI) and perform the refutation.

The code I used is like below.

from sklearn.preprocessing import PolynomialFeatures
from sklearn.linear_model import LassoCV
from sklearn.ensemble import GradientBoostingRegressor
from econml.inference import BootstrapInference
dml_estimate = model.estimate_effect(identified_estimand, 
                                     method_name="backdoor.econml.dml.DML",
                                     target_units = "ate",
                                     confidence_intervals=True,
                                     method_params={"init_params":{'model_y':GradientBoostingRegressor(),
                                                              'model_t': GradientBoostingRegressor(),
                                                              "model_final": LassoCV(fit_intercept=False), 
                                                              'featurizer':PolynomialFeatures(degree=1, include_bias=True)},
                                               "fit_params":{
                                                               'inference': BootstrapInference(n_bootstrap_samples=100, n_jobs=-1),
                                                            }
                                              })
print(dml_estimate)

# IV. Refute the obtained estimate using multiple robustness checks.
refute_placebo_treatment = model.refute_estimate(
    identified_estimand, dml_estimate,
    method_name="placebo_treatment_refuter"
)
print(refute_placebo_treatment)

After calculating CI, it seems like refutation takes a very long time. Is this the expected outcome, or do I need to make some additional settings after calculating CI?

Version information:

  • DoWhy 0.10.1

This issue is stale because it has been open for 14 days with no activity.

This issue was closed because it has been inactive for 7 days since being marked as stale.