Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. from mpl_toolkits.mplot3d import Axes3D
  2. import matplotlib.pyplot as plt
  3.  
  4. fig = plt.figure(figsize=(10, 10))
  5.  
  6. blue = mpatches.Patch(color='blue', label='Clean data')
  7. red = mpatches.Patch(color='red', label='Anomalies')
  8.  
  9. ax1 = fig.add_subplot(111, projection='3d')
  10. ax1.legend(handles=[blue, red])
  11.  
  12. ax1.scatter(encoded_test[:,0], encoded_test[:,1], encoded_test[:, 2], c=(y_ae==-1), cmap='coolwarm', label='Clean data', linewidths=2, s=40)
  13. ax1.scatter(encoded_test[:,0], encoded_test[:,1], encoded_test[:, 2], c=(y_ae==1), cmap='coolwarm', label='Anomalies', linewidths=2, s=40)
  14. ax1.set_title('Feed-forward autoencoder')
  15.  
  16.  
  17. plt.show()
  18.  
  19.  
  20. # In[ ]:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement