-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf8c0e7
commit 055bded
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os | ||
|
||
import pytest | ||
import pandas as pd | ||
import numpy as np | ||
|
||
|
||
@pytest.fixture() | ||
def ovarian_cancer_dataset(): | ||
dir_path = os.path.dirname(os.path.realpath(__file__)) | ||
|
||
data = pd.read_csv( | ||
os.path.join(dir_path, "data", "ovarian_cancer.csv"), index_col="idx" | ||
) | ||
|
||
# Unfortunately it's unclear how the missing data was imputed in the article | ||
# We use median imputation here. As such AUROCs are the same but p-values differ. | ||
data.albumin = data.albumin.fillna(np.median(data.albumin.dropna())) | ||
data.total_protein = data.total_protein.fillna( | ||
np.median(data.total_protein.dropna()) | ||
) | ||
|
||
return data |