Skip to content

Commit

Permalink
Fix #760
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
Signed-off-by: kgao <kevin.leo.gao@gmail.com>
  • Loading branch information
kbattocchi authored and kgao committed May 18, 2023
1 parent 12e9da9 commit 83851c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion econml/_ortho_learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def score(self, Y, T, X=None, W=None, Z=None, sample_weight=None, groups=None):
nuisances = [np.zeros((n_iters * n_splits,) + nuis.shape) for nuis in nuisance_temp]

for it, nuis in enumerate(nuisance_temp):
nuisances[it][i * n_iters + j] = nuis
nuisances[it][j * n_iters + i] = nuis

for it in range(len(nuisances)):
nuisances[it] = np.mean(nuisances[it], axis=0)
Expand Down
1 change: 1 addition & 0 deletions econml/tests/test_dml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,7 @@ def test_nuisance_scores(self):
est.fit(y, T, X=X, W=W)
assert len(est.nuisance_scores_t) == len(est.nuisance_scores_y) == mc_iters
assert len(est.nuisance_scores_t[0]) == len(est.nuisance_scores_y[0]) == cv
est.score(y, T, X=X, W=W)

def test_categories(self):
dmls = [LinearDML, SparseLinearDML]
Expand Down

0 comments on commit 83851c9

Please sign in to comment.