Created
June 20, 2020 16:15
-
-
Save sadimanna/dd3b016576c605ced5120b42652d3494 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 prevalence(y): | |
return np.sum(y)/y.shape[0] |
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 prevalence(y,pred): | |
tp = TP(y,pred,th) | |
fp = FP(y,pred,th) | |
tn = TN(y,pred,th) | |
fn = FN(y,pred,th) | |
return (tp+fn)/(tp+fp+tn+fn) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment