Skip to content

Commit

Permalink
use np.unique instead of convert to set and list
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouker94 committed Oct 7, 2019
1 parent 1fcea93 commit 9229681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tpot/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def balanced_accuracy(y_true, y_pred):
Returns a float value indicating the individual's balanced accuracy
0.5 is as good as chance, and 1.0 is perfect predictive accuracy
"""
all_classes = list(set(np.append(y_true, y_pred)))
all_classes = np.unique(np.append(y_true, y_pred))
all_class_accuracies = []
for this_class in all_classes:
this_class_sensitivity = 0.
Expand Down

0 comments on commit 9229681

Please sign in to comment.