Created
May 11, 2022 09:47
-
-
Save erykml/2f3af72a824eb24f5c530b2f45f63af4 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
| pred_df["TP"] = np.where(pred_df["class"] == 1, pred_df["prob"], 0) | |
| pred_df["FP"] = np.where(pred_df["class"] == 1, 1 - pred_df["prob"], 0) | |
| pred_df["TN"] = np.where(pred_df["class"] == 0, 1- pred_df["prob"], 0) | |
| pred_df["FN"] = np.where(pred_df["class"] == 0, pred_df["prob"], 0) | |
| pred_df |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment