Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. prediction = []
  2.  
  3. for i in test_labels:
  4. for item in my_labels:
  5. if item == int(i):
  6. prediction.append("true")
  7. else:
  8. prediction.append("false")
  9.  
  10. print prediction
  11.  
  12. prediction = []
  13.  
  14. for i in range(len(test_labels)):
  15. if test_labels[i] == my_labels[i]:
  16. prediction.append("true")
  17. else:
  18. prediction.append("false")
  19.  
  20. prediction = []
  21.  
  22. for i in range(0, len(test_labels)):
  23. if my_labels[i] == test_labels[i]:
  24. prediction.append("true")
  25. else:
  26. prediction.append("false")
  27.  
  28. print prediction
  29.  
  30. prediction = []
  31.  
  32. for x, y in zip(test_labels, my_labels):
  33. if x == y:
  34. prediction.append("true")
  35. else:
  36. prediction.append("false")
  37.  
  38. print(prediction)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement