Skip to content

Commit

Permalink
just for test
Browse files Browse the repository at this point in the history
  • Loading branch information
fatisati committed Jan 23, 2024
1 parent 35ed4f3 commit 5be1565
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/tools/test_sa.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ def test_anova_glm(self):
assert dataframe.iloc[1, 4] == 2
assert pytest.approx(dataframe.iloc[1, 5], 0.1) == 0.103185

def test_cox_ph(self):
adata = ep.dt.mimic_2(encoded=False)
adata[:, ["censor_flg"]].X = np.where(adata[:, ["censor_flg"]].X == 0, 1, 0)
cph = ep.tl.cox_ph(adata, "mort_day_censored", "censor_flg")
# def test_cox_ph(self):
# adata = ep.dt.mimic_2(encoded=False)
# adata[:, ["censor_flg"]].X = np.where(adata[:, ["censor_flg"]].X == 0, 1, 0)
# cph = ep.tl.cox_ph(adata, "mort_day_censored", "censor_flg")

assert isinstance(cph, CoxPHFitter)
assert len(cph.durations) == 1776
assert sum(cph.event_observed) == 497
# assert isinstance(cph, CoxPHFitter)
# assert len(cph.durations) == 1776
# assert sum(cph.event_observed) == 497

0 comments on commit 5be1565

Please sign in to comment.