Created
April 7, 2019 16:10
-
-
Save sergeyprokudin/5a882ff4120b3ad5dc83bedcd117c7b5 to your computer and use it in GitHub Desktop.
plots Guassian density together with some ground truth value gt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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