Skip to content

Commit

Permalink
add accuracy eval_metric (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
pplonski committed Apr 1, 2021
1 parent ad49896 commit fae708d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion supervised/utils/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def negative_f1(y_true, y_predicted, sample_weight=None):
y_predicted = y_predicted.ravel()

average = None
if len(y_predicted.shape) == 1 or (len(y_predicted.shape) == 2 and y_predicted.shape[1] == 1):
if len(y_predicted.shape) == 1:
y_predicted = (y_predicted > 0.5).astype(int)
average = "binary"
else:
Expand Down

0 comments on commit fae708d

Please sign in to comment.