To generate random numbers that follow the Rayleigh distribution with peaks in the distribution
import random random.weibullvariate(peak,2)
Is easy to use.
When using np.random.weibull with numpy It seems that the parameters are slightly different from random, so be careful.
reference: https://en.wikipedia.org/wiki/Rayleigh_distribution https://docs.python.org/2/library/random.html https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.weibull.html
Recommended Posts