<filename>gauss/plots.py<gh_stars>0
# plot out the distribution to help deciding the params setting
import numpy as np
from matplotlib import pyplot as plt
import scipy.special as sps  

shape, scale = 2., 2.  # mean=4, std=2*sqrt(2)
s = np.random.gamma(shape, scale, 1000)
count, bins, ignored = plt.hist(s, 50, density=True)
y = bins**(shape-1)*(np.exp(-bins/scale) /  
                     (sps.gamma(shape)*scale**shape))
plt.plot(bins, y, linewidth=2, color='r')  
plt.show()

<filename>gauss/plots.py<gh_stars>0
# plot out the distribution to help deciding the params setting
import numpy as np
from matplotlib import pyplot as plt
import scipy.special as sps  

shape, scale = 2., 2.  # mean=4, std=2*sqrt(2)
s = np.random.gamma(shape, scale, 1000)
count, bins, ignored = plt.hist(s, 50, density=True)
y = bins**(shape-1)*(np.exp(-bins/scale) /  
                     (sps.gamma(shape)*scale**shape))
plt.plot(bins, y, linewidth=2, color='r')  
plt.show()

# plot out the distribution to help deciding the params setting # mean=4, std=2*sqrt(2)