Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from mpl_toolkits.mplot3d import Axes3D
- import matplotlib.pyplot as plt
- fig = plt.figure(figsize=(10, 10))
- blue = mpatches.Patch(color='blue', label='Clean data')
- red = mpatches.Patch(color='red', label='Anomalies')
- ax1 = fig.add_subplot(111, projection='3d')
- ax1.legend(handles=[blue, red])
- ax1.scatter(encoded_test[:,0], encoded_test[:,1], encoded_test[:, 2], c=(y_ae==-1), cmap='coolwarm', label='Clean data', linewidths=2, s=40)
- ax1.scatter(encoded_test[:,0], encoded_test[:,1], encoded_test[:, 2], c=(y_ae==1), cmap='coolwarm', label='Anomalies', linewidths=2, s=40)
- ax1.set_title('Feed-forward autoencoder')
- plt.show()
- # In[ ]:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement