Last active
June 20, 2020 14:50
-
-
Save sadimanna/d76f097f0cca313b2e3fe1de63ca1b56 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def TP(y, pred, th=0.5): | |
pred_t = (pred > th) | |
return np.sum((pred_t == True) & (y == 1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment