Skip to content

Commit 89dba72

Browse files
Remove CausalForestEstimator test
1 parent f34a6d1 commit 89dba72

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

tests/testing_tests/test_estimators.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -437,33 +437,6 @@ def test_program_11_3_cublic_spline(self):
437437
self.assertAlmostEqual(ate_1[0] * 2, ate_2[0])
438438

439439

440-
def test_program_15_cate(self):
441-
"""Test whether our causal forest implementation produces the similar CATE to program 15.1 (p. 163, 184)."""
442-
df = self.nhefs_df
443-
smoking_intensity_5_and_40_df = df.loc[(df["smokeintensity"] == 5) | (df["smokeintensity"] == 40)]
444-
covariates = {
445-
"sex",
446-
"race",
447-
"age",
448-
"edu_2",
449-
"edu_3",
450-
"edu_4",
451-
"edu_5",
452-
"exercise_1",
453-
"exercise_2",
454-
"active_1",
455-
"active_2",
456-
"wt71",
457-
"smokeintensity",
458-
"smokeyrs",
459-
}
460-
causal_forest = CausalForestEstimator(
461-
"qsmk", 1, 0, covariates, "wt82_71", smoking_intensity_5_and_40_df, {"smokeintensity": 40}
462-
)
463-
cates_df, _ = causal_forest.estimate_cates()
464-
self.assertGreater(cates_df["cate"].mean(), 0)
465-
466-
467440
class TestLinearRegressionInteraction(unittest.TestCase):
468441
"""Test linear regression for estimating effects involving interaction."""
469442

0 commit comments

Comments
 (0)