Skip to content

Commit

Permalink
feature: test single numpy array
Browse files Browse the repository at this point in the history
  • Loading branch information
Alistair Johnson committed Dec 15, 2019
1 parent dd56ce9 commit bbc0a65
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_pyroc.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ def test_pyroc_input_parsing(ovarian_cancer_dataset):
target = df['outcome'].values
df = df.drop('outcome', axis=1)

# single numpy array of preds
preds = df['albumin'].values
roc = pyroc.ROC(
target,
preds,
)
# since roc wasn't provided predictor labels,
# keys are integers (i)
assert (roc.preds[0][:n] == expected_values['albumin'][:n]).all()

# numpy arrays
preds = df.values
roc = pyroc.ROC(
Expand Down

0 comments on commit bbc0a65

Please sign in to comment.