RandomState.laplace()

RandomState.laplace(loc=0.0, scale=1.0, size=None) Draw samples from the Laplace or double exponential distribution with specified location (or mean) and scale (decay). The Laplace distribution is similar to the Gaussian/normal distribution, but is sharper at the peak and has fatter tails. It represents the difference between two independent, identically distributed exponential random variables. Parameters: loc : float, optional The position, , of the distribution peak. scale : float, op

RandomState.hypergeometric()

RandomState.hypergeometric(ngood, nbad, nsample, size=None) Draw samples from a Hypergeometric distribution. Samples are drawn from a hypergeometric distribution with specified parameters, ngood (ways to make a good selection), nbad (ways to make a bad selection), and nsample = number of items sampled, which is less than or equal to the sum ngood + nbad. Parameters: ngood : int or array_like Number of ways to make a good selection. Must be nonnegative. nbad : int or array_like Number of

RandomState.gumbel()

RandomState.gumbel(loc=0.0, scale=1.0, size=None) Draw samples from a Gumbel distribution. Draw samples from a Gumbel distribution with specified location and scale. For more information on the Gumbel distribution, see Notes and References below. Parameters: loc : float The location of the mode of the distribution. scale : float The scale parameter of the distribution. size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples ar

RandomState.get_state()

RandomState.get_state() Return a tuple representing the internal state of the generator. For more details, see set_state. Returns: out : tuple(str, ndarray of 624 uints, int, int, float) The returned tuple has the following items: the string ?MT19937?. a 1-D array of 624 unsigned integer keys. an integer pos. an integer has_gauss. a float cached_gaussian. See also set_state Notes set_state and get_state are not needed to work with any of the random distributions in NumPy. If the intern

RandomState.geometric()

RandomState.geometric(p, size=None) Draw samples from the geometric distribution. Bernoulli trials are experiments with one of two outcomes: success or failure (an example of such an experiment is flipping a coin). The geometric distribution models the number of trials that must be run in order to achieve success. It is therefore supported on the positive integers, k = 1, 2, .... The probability mass function of the geometric distribution is where p is the probability of success of an in

RandomState.gamma()

RandomState.gamma(shape, scale=1.0, size=None) Draw samples from a Gamma distribution. Samples are drawn from a Gamma distribution with specified parameters, shape (sometimes designated ?k?) and scale (sometimes designated ?theta?), where both parameters are > 0. Parameters: shape : scalar > 0 The shape of the gamma distribution. scale : scalar > 0, optional The scale of the gamma distribution. Default is equal to 1. size : int or tuple of ints, optional Output shape. If the

RandomState.f()

RandomState.f(dfnum, dfden, size=None) Draw samples from an F distribution. Samples are drawn from an F distribution with specified parameters, dfnum (degrees of freedom in numerator) and dfden (degrees of freedom in denominator), where both parameters should be greater than zero. The random variate of the F distribution (also known as the Fisher distribution) is a continuous probability distribution that arises in ANOVA tests, and is the ratio of two chi-square variates. Parameters: dfnum

RandomState.exponential()

RandomState.exponential(scale=1.0, size=None) Draw samples from an exponential distribution. Its probability density function is for x > 0 and 0 elsewhere. is the scale parameter, which is the inverse of the rate parameter . The rate parameter is an alternative, widely used parameterization of the exponential distribution [R147]. The exponential distribution is a continuous analogue of the geometric distribution. It describes many common situations, such as the size of raindrops meas

RandomState.dirichlet()

RandomState.dirichlet(alpha, size=None) Draw samples from the Dirichlet distribution. Draw size samples of dimension k from a Dirichlet distribution. A Dirichlet-distributed random variable can be seen as a multivariate generalization of a Beta distribution. Dirichlet pdf is the conjugate prior of a multinomial in Bayesian inference. Parameters: alpha : array Parameter of the distribution (k dimension for sample of dimension k). size : int or tuple of ints, optional Output shape. If the

RandomState.choice()

RandomState.choice(a, size=None, replace=True, p=None) Generates a random sample from a given 1-D array New in version 1.7.0. Parameters: a : 1-D array-like or int If an ndarray, a random sample is generated from its elements. If an int, the random sample is generated as if a was np.arange(n) 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. Default is None, in which case a single value is returned. replace