Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. plt.figure(figsize=(20, 15))
  2. x = np.linspace(0, 10, 1000)
  3. sigma_list = [0.1, 1, 5, 10]
  4.  
  5. for sigma in sigma_list:
  6. my_prob = lambda x: np.exp(-x**2 / (2*sigma**2))
  7. plt.plot(x, my_prob(x))
  8. plt.gca().legend(('$\sigma$ = 0.1','$\sigma$ = 1', '$\sigma$ = 5', '$\sigma$ = 10'),
  9. fontsize = 20)
  10. plt.title("High-Dimensional Probability of Pairwise Euclidean Distances", fontsize = 20)
  11. plt.xlabel("X", fontsize = 20); plt.ylabel("P(X)", fontsize = 20)
  12. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement