Skip to content

Commit 3fd3a8e

Browse files
committed
remove redundant variable definitions
1 parent 216f9b9 commit 3fd3a8e

File tree

4 files changed

+0
-4
lines changed

4 files changed

+0
-4
lines changed

doubleml/irm/cvar.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ def ipw_score(theta):
292292
m_hat['preds'] = _trimm(m_hat['preds'], self.trimming_rule, self.trimming_threshold)
293293

294294
# this is not done in the score to be equivalent to PQ models
295-
m_hat_adj = np.full_like(m_hat['preds'], np.nan, dtype='float64')
296295
if self._normalize_ipw:
297296
m_hat_adj = _normalize_ipw(m_hat['preds'], d)
298297
else:

doubleml/irm/iivm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ def _score_elements(self, y, z, d, g_hat0, g_hat1, m_hat, r_hat0, r_hat1, smpls)
379379
w_hat0 = d - r_hat0
380380
w_hat1 = d - r_hat1
381381

382-
m_hat_adj = np.full_like(m_hat, np.nan, dtype='float64')
383382
if self.normalize_ipw:
384383
m_hat_adj = _normalize_ipw(m_hat, d)
385384
else:

doubleml/irm/pq.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ def ipw_score(theta):
379379

380380
# this is not done in the score to save computation due to multiple score evaluations
381381
# to be able to evaluate the raw models the m_hat['preds'] are not changed
382-
m_hat_adj = np.full_like(m_hat['preds'], np.nan, dtype='float64')
383382
if self._normalize_ipw:
384383
m_hat_adj = _normalize_ipw(m_hat['preds'], d)
385384
else:

doubleml/irm/tests/_utils_iivm_manual.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ def iivm_dml2(y, x, d, z, g_hat0_list, g_hat1_list, m_hat_list, r_hat0_list, r_h
159159
u_hat0, u_hat1, w_hat0, w_hat1, g_hat0, g_hat1, m_hat, r_hat0, r_hat1 = compute_iivm_residuals(
160160
y, d, g_hat0_list, g_hat1_list, m_hat_list, r_hat0_list, r_hat1_list, smpls)
161161

162-
m_hat_adj = np.full_like(m_hat, np.nan, dtype='float64')
163162
if normalize_ipw:
164163
m_hat_adj = _normalize_ipw(m_hat, d)
165164
else:

0 commit comments

Comments
 (0)