You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import numpy as np
  2. import matplotlib as mpl
  3. import matplotlib.pyplot as plt
  4. import seaborn as sns
  5. sns.set()
  6. sns.set_style("ticks")
  7. sns.set_context("poster",font_scale=1.28,rc={"lines.linewidth": 3})
  8. ### plot robustness result
  9. noise = np.array([0,0.2,0.4,0.6,0.8,1.0])
  10. MLP_degree = np.array([0.3440, 0.1365, 0.0663, 0.0430, 0.0214, 0.0201])
  11. RNN_degree = np.array([0.5, 0.5, 0.5, 0.5, 0.5, 0.5])
  12. BA_degree = np.array([0.0892,0.3558,1.1754,1.5914,1.7037,1.7502])
  13. Gnp_degree = np.array([1.7115,1.5536,0.5529,0.1433,0.0725,0.0503])
  14. MLP_clustering = np.array([0.0096, 0.0056, 0.0027, 0.0020, 0.0012, 0.0028])
  15. RNN_clustering = np.array([0.5, 0.5, 0.5, 0.5, 0.5, 0.5])
  16. BA_clustering = np.array([0.0255,0.0881,0.3433,0.4237,0.6041,0.7851])
  17. Gnp_clustering = np.array([0.7683,0.1849,0.1081,0.0146,0.0210,0.0329])
  18. plt.plot(noise,Gnp_degree)
  19. plt.plot(noise,BA_degree)
  20. plt.plot(noise, MLP_degree)
  21. # plt.plot(noise, RNN_degree)
  22. # plt.rc('text', usetex=True)
  23. plt.legend(['E-R','B-A','GraphRNN'])
  24. plt.xlabel('Noise level')
  25. plt.ylabel('MMD degree')
  26. plt.tight_layout()
  27. plt.savefig('figures_paper/robustness_degree.png',dpi=300)
  28. plt.close()
  29. plt.plot(noise,Gnp_clustering)
  30. plt.plot(noise,BA_clustering)
  31. plt.plot(noise, MLP_clustering)
  32. # plt.plot(noise, RNN_clustering)
  33. plt.legend(['E-R','B-A','GraphRNN'])
  34. plt.xlabel('Noise level')
  35. plt.ylabel('MMD clustering')
  36. plt.tight_layout()
  37. plt.savefig('figures_paper/robustness_clustering.png',dpi=300)
  38. plt.close()