Skip to content

Instantly share code, notes, and snippets.

@sergeyprokudin
Created April 7, 2019 16:10
Show Gist options
  • Save sergeyprokudin/5a882ff4120b3ad5dc83bedcd117c7b5 to your computer and use it in GitHub Desktop.
Save sergeyprokudin/5a882ff4120b3ad5dc83bedcd117c7b5 to your computer and use it in GitHub Desktop.
plots Guassian density together with some ground truth value gt
import matplotlib.pyplot as plt
import scipy.stats as stats
def plot_gauss_pdf(mu, sigma, gt):
''' plots Guassian density together with some ground truth value gt
'''
x = np.linspace(mu - 5*sigma, mu + 5*sigma, 100)
plt.plot(x, stats.norm.pdf(x, mu, sigma))
plt.axvline(mu, c='blue', label='prediction mean')
plt.axvline(gt, c='green', label='ground truth')
plt.legend()
plt.show()
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment