Skip to content

Commit

Permalink
int
Browse files Browse the repository at this point in the history
  • Loading branch information
marta-sd committed Dec 13, 2017
1 parent 9b46ddb commit 471592c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oddt/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def enrichment_factor(y_true, y_score, percentage=1, pos_label=None, kind='fold'
assert labels.sum() > 0, "There are no correct predicions. Double-check the pos_label"
assert len(labels) > 0, "Sample size must be greater than 0"
# calculate fraction of positve labels
n_perc = ceil(percentage / 100. * len(labels))
n_perc = int(ceil(percentage / 100. * len(labels)))
out = labels[:n_perc].sum() / n_perc
if kind == 'fold':
out /= (labels.sum() / len(labels))
Expand Down

0 comments on commit 471592c

Please sign in to comment.