Advertisement
YoramJF

Untitled

Feb 14th, 2021
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. y_pred_norm = clf_norm.predict(X_test_minmax)
  2. y_test = np.array(y_test)
  3.  
  4.  
  5. tn = 0
  6. tp = 0
  7. fn = 0
  8. fp = 0
  9. for i in y_pred:
  10. if y_test[i] == y_pred[i] and y_pred_norm[i] == 0:
  11. tn += 1
  12. if y_test[i] != y_pred[i] and y_pred_norm[i] == 0:
  13. fn += 1
  14. if y_test[i] == y_pred[i] and y_pred_norm[i] == 1:
  15. tp += 1
  16. if y_test[i] != y_pred[i] and y_pred_norm[i] == 1:
  17. fp += 1
  18. else:
  19. raise Exception("PERNIEK")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement