Skip to content

Instantly share code, notes, and snippets.

@sadimanna
Created June 20, 2020 14:51
Show Gist options
  • Save sadimanna/2d1ba708741c971a476e1e05a0308efd to your computer and use it in GitHub Desktop.
Save sadimanna/2d1ba708741c971a476e1e05a0308efd to your computer and use it in GitHub Desktop.
def TN(y, pred, th=0.5):
pred_t = (pred > th)
return np.sum((pred_t == False) & (y == 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment