Skip to content

Commit 1f162dc

Browse files
committed
Adjust hh model exploration test for new column names, no training columns and nnot saving suspicious data.
1 parent f083378 commit 1f162dc

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

hlink/tests/hh_model_exploration_test.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ def test_all_hh_mod_ev(
5757
"precision_test_mean",
5858
"recall_test_mean",
5959
"mcc_test_mean",
60-
"precision_train_mean",
61-
"recall_train_mean",
62-
"pr_auc_mean",
63-
"mcc_train_mean",
60+
"pr_auc_test_mean",
6461
]
6562

6663
# TODO we should expect to get most of these columns once the results reporting is finished.
@@ -75,14 +72,8 @@ def test_all_hh_mod_ev(
7572
"recall_test_sd",
7673
"mcc_test_sd",
7774
"mcc_test_mean",
78-
"precision_train_mean",
79-
"precision_train_sd",
80-
"recall_train_mean",
81-
"recall_train_sd",
82-
"pr_auc_mean",
83-
"pr_auc_sd",
84-
"mcc_train_mean",
85-
"mcc_train_sd",
75+
"pr_auc_test_mean",
76+
"pr_auc_test_sd",
8677
"maxDepth",
8778
"numTrees",
8879
]
@@ -97,7 +88,9 @@ def test_all_hh_mod_ev(
9788
)
9889
assert tr.query("model == 'logistic_regression'")["alpha_threshold"].iloc[0] == 0.5
9990
assert (
100-
0.7 < tr.query("model == 'logistic_regression'")["pr_auc_mean"].iloc[0] <= 1.0
91+
0.7
92+
< tr.query("model == 'logistic_regression'")["pr_auc_test_mean"].iloc[0]
93+
<= 1.0
10194
)
10295
assert (
10396
0.9
@@ -131,6 +124,8 @@ def test_all_hh_mod_ev(
131124
assert 0.0 < pm0["second_best_prob"].iloc[0] < 0.5
132125
"""
133126

127+
# Not saving predict-train test results anymore
128+
"""
134129
pred_train = spark.table("hh_model_eval_predict_train").toPandas()
135130
assert all(
136131
elem in list(pred_train.columns)
@@ -145,6 +140,7 @@ def test_all_hh_mod_ev(
145140
"match",
146141
]
147142
)
143+
"""
148144

149145
# TODO the exact links are different.
150146
"""

0 commit comments

Comments
 (0)