Skip to content

Instantly share code, notes, and snippets.

@nsorros
Created February 14, 2022 12:29
Show Gist options
  • Save nsorros/b201945a041c4ac37fe17acbbacf2b60 to your computer and use it in GitHub Desktop.
Save nsorros/b201945a041c4ac37fe17acbbacf2b60 to your computer and use it in GitHub Desktop.
if fp(optimal_thresholds_star) > fp(optimal_thresholds):
optimal_thresholds = optimal_thresholds_star
y_pred = y_pred_proba > optimal_thresholds[k]
cmk = confusion_matrix(y_test, y_pred)
mlcm[k,:,:] = cmk
updated = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment