Skip to content

Commit

Permalink
Add flat pred function
Browse files Browse the repository at this point in the history
  • Loading branch information
Javclaude committed May 31, 2020
1 parent 4f5770c commit c0ca7a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from sklearn.model_selection import train_test_split
from keras.utils import to_categorical

def flat_pred(preds, threshold):
return np.where(preds>threshold, 1, 0)

def set_seed(seed):
random.seed(seed)
Expand Down

0 comments on commit c0ca7a3

Please sign in to comment.