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.
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?
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.
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: