-
Notifications
You must be signed in to change notification settings - Fork 94
Remove apply_crossfitting
and dml_procedure
options from DoubleML class
#227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -134,6 +120,11 @@ | |||
y_treat = self._dml_data.y[self._dml_data.d == self.treatment] | |||
self._coef_start_val = np.mean(y_treat[y_treat >= np.quantile(y_treat, self.quantile)]) | |||
|
|||
# set stratication for resampling | |||
self._strata = self._dml_data.d |
Check warning
Code scanning / CodeQL
Overwriting attribute in super-class or sub-class
@@ -153,6 +145,13 @@ | |||
self._coef_bounds = (self._dml_data.y.min(), self._dml_data.y.max()) | |||
self._coef_start_val = np.quantile(self._dml_data.y[self._dml_data.d == self.treatment], self.quantile) | |||
|
|||
# set stratication for resampling | |||
self._strata = self._dml_data.d.reshape(-1, 1) + 2 * self._dml_data.z.reshape(-1, 1) |
Check warning
Code scanning / CodeQL
Overwriting attribute in super-class or sub-class
if draw_sample_splitting: | ||
self.draw_sample_splitting() | ||
|
||
self._external_predictions_implemented = True |
Check warning
Code scanning / CodeQL
Overwriting attribute in super-class or sub-class
@@ -165,6 +152,13 @@ | |||
self._coef_bounds = (self._dml_data.y.min(), self._dml_data.y.max()) | |||
self._coef_start_val = np.quantile(self._dml_data.y[self._dml_data.d == self.treatment], self.quantile) | |||
|
|||
# set stratication for resampling | |||
self._strata = self._dml_data.d |
Check warning
Code scanning / CodeQL
Overwriting attribute in super-class or sub-class
if draw_sample_splitting: | ||
self.draw_sample_splitting() | ||
|
||
self._external_predictions_implemented = True |
Check warning
Code scanning / CodeQL
Overwriting attribute in super-class or sub-class
Comments
Remove the options
apply_crossfitting
anddml_procedure
.dml1
is not used and crossfitting should generally be done (if not wanted the predictions can still be generated externally)Further, removed the
boot_coef
attribute as the name is slightly misleading and it is not required for bootstrapped confidence intervals.Simplify the
fit()
implementation.PR Checklist