Horje
np.random.normal Code Example
python random from normal distribution
>>> mu, sigma = 0, 0.1 # mean and standard deviation
>>> s = np.random.normal(mu, sigma, 1000)
np.random.normal
import numpy as np
np.random.normal(loc=0.0, scale=1.0, size=None)  #Example below

mean, standard_deviation, samples = 23 ,0.8 ,1000

normal_samples = np.random.normal(loc=mean,scale=standard_deviation, size=samples)
'''Parameters
loc :float or array_like of floats
Mean (“centre”) of the distribution.

scale: float or array_like of floats
Standard deviation (spread or “width”) of the distribution. 
Must be non-negative.

size :int or tuple of ints, optional Output shape. 
If the given shape is, e.g., (m, n, k), 
then m * n * k samples are drawn. 
If size is None (default),
a single value is returned if loc and scale are both scalars.
Otherwise, np.broadcast(loc, scale).size samples are drawn.'''

'''Returns
outndarray or scalar
Drawn samples from the parameterized normal distribution.'''




Python

Related
logistic regression python family binomial Code Example logistic regression python family binomial Code Example
convert a column to camel case in python Code Example convert a column to camel case in python Code Example
keras model predict list of input tensors Code Example keras model predict list of input tensors Code Example
heroku python version Code Example heroku python version Code Example
limpar idle python Code Example limpar idle python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7