From c5fea7e05fe0f0c8bd4e0fd394b93dddd3f13f45 Mon Sep 17 00:00:00 2001 From: Amit Sharma Date: Sat, 2 Dec 2023 10:53:42 +0530 Subject: [PATCH] fixed bug where CATE is not returned by lr Signed-off-by: Amit Sharma --- dowhy/causal_estimators/regression_estimator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dowhy/causal_estimators/regression_estimator.py b/dowhy/causal_estimators/regression_estimator.py index 437d5aa4aa..70662cac83 100644 --- a/dowhy/causal_estimators/regression_estimator.py +++ b/dowhy/causal_estimators/regression_estimator.py @@ -117,6 +117,8 @@ def estimate_effect( self._target_units = target_units self._treatment_value = treatment_value self._control_value = control_value + if need_conditional_estimates is None: + need_conditional_estimates = self.need_conditional_estimates # TODO make treatment_value and control value also as local parameters # All treatments are set to the same constant value effect_estimate = self._do(data, treatment_value) - self._do(data, control_value)