| Trees | Indices | Help |
|---|
|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Return a RandomState instance. This function exists solely to assist (un)pickling. |
Beta distribution over [0, 1]. beta(a, b, size=None) -> random values |
Binomial distribution of n trials and p probability of success. binomial(n, p, size=None) -> random values |
Return random bytes. bytes(length) -> str |
Chi^2 distribution. chisquare(df, size=None) -> random values |
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 : array
number of samples to draw.
$X pprox \prod_{i=1}^{k}{x^{lpha_i-1}_i}$
Uses the following property for computation: for each dimension,
draw a random sample y_i from a standard gamma generator of shape
alpha_i, then X = rac{1}{\sum_{i=1}^k{y_i}} (y_1, ..., y_n) is
Dirichlet distributed.
Reference:
- David Mc Kay : Information Theory, inference and Learning
algorithms, chapter 23. the book is available for free at
http://www.inference.phy.cam.ac.uk/mackay/
|
Exponential distribution. exponential(scale=1.0, size=None) -> random values |
F distribution. f(dfnum, dfden, size=None) -> random values |
Gamma distribution. gamma(shape, scale=1.0, size=None) -> random values |
Geometric distribution with p being the probability of "success" on an individual trial. geometric(p, size=None) |
Return a tuple representing the internal state of the generator. get_state() -> ('MT19937', int key[624], int pos) |
Gumbel distribution. gumbel(loc=0.0, scale=1.0, size=None) |
Hypergeometric distribution. Consider an urn with ngood "good" balls and nbad "bad" balls. If one were to draw nsample balls from the urn without replacement, then the hypergeometric distribution describes the distribution of "good" balls in the sample. hypergeometric(ngood, nbad, nsample, size=None) |
Laplace distribution. laplace(loc=0.0, scale=1.0, size=None) |
Logistic distribution. logistic(loc=0.0, scale=1.0, size=None) |
Log-normal distribution.
Note that the mean parameter is not the mean of this distribution, but
the underlying normal distribution.
lognormal(mean, sigma) <=> exp(normal(mean, sigma))
lognormal(mean=0.0, sigma=1.0, size=None)
|
Logarithmic series distribution. logseries(p, size=None) |
Multinomial distribution. multinomial(n, pvals, size=None) -> random values pvals is a sequence of probabilities that should sum to 1 (however, the last element is always assumed to account for the remaining probability as long as sum(pvals[:-1]) <= 1). |
Return an array containing multivariate normally distributed random numbers with specified mean and covariance. multivariate_normal(mean, cov) -> random values multivariate_normal(mean, cov, [m, n, ...]) -> random values mean must be a 1 dimensional array. cov must be a square two dimensional array with the same number of rows and columns as mean has elements. The first form returns a single 1-D array containing a multivariate normal. The second form returns an array of shape (m, n, ..., cov.shape[0]). In this case, output[i,j,...,:] is a 1-D array containing a multivariate normal. |
Negative Binomial distribution. negative_binomial(n, p, size=None) -> random values |
Noncentral Chi^2 distribution. noncentral_chisquare(df, nonc, size=None) -> random values |
Noncentral F distribution. noncentral_f(dfnum, dfden, nonc, size=None) -> random values |
Normal distribution (mean=loc, stdev=scale). normal(loc=0.0, scale=1.0, size=None) -> random values |
Pareto distribution. pareto(a, size=None) |
Given an integer, return a shuffled sequence of integers >= 0 and < x; given a sequence, return a shuffled array copy. permutation(x) |
Poisson distribution. poisson(lam=1.0, size=None) -> random values |
Power distribution. power(a, size=None) |
Return an array of the given dimensions which is initialized to
random numbers from a uniform distribution in the range [0,1).
rand(d0, d1, ..., dn) -> random values
Note: This is a convenience function. If you want an
interface that takes a tuple as the first argument
use numpy.random.random_sample(shape_tuple).
|
Return random integers x such that low <= x < high. randint(low, high=None, size=None) -> random values If high is None, then 0 <= x < low. |
Returns zero-mean, unit-variance Gaussian random numbers in an
array of shape (d0, d1, ..., dn).
randn(d0, d1, ..., dn) -> random values
Note: This is a convenience function. If you want an
interface that takes a tuple as the first argument
use numpy.random.standard_normal(shape_tuple).
|
Return random floats in the half-open interval [0.0, 1.0). random_sample(size=None) -> random values |
Return random integers x such that low <= x <= high. random_integers(low, high=None, size=None) -> random values. If high is None, then 1 <= x <= low. |
Return random floats in the half-open interval [0.0, 1.0). random_sample(size=None) -> random values |
Return random floats in the half-open interval [0.0, 1.0). random_sample(size=None) -> random values |
Rayleigh distribution. rayleigh(scale=1.0, size=None) |
Return random floats in the half-open interval [0.0, 1.0). random_sample(size=None) -> random values |
Seed the generator. seed(seed=None) seed can be an integer, an array (or other sequence) of integers of any length, or None. If seed is None, then RandomState will try to read data from /dev/urandom (or the Windows analogue) if available or seed from the clock otherwise. |
Set the state from a tuple. state = ('MT19937', int key[624], int pos) set_state(state) |
Modify a sequence in-place by shuffling its contents. shuffle(x) |
Standard Cauchy with mode=0. standard_cauchy(size=None) |
Standard exponential distribution (scale=1). standard_exponential(size=None) -> random values |
Standard Gamma distribution. standard_gamma(shape, size=None) -> random values |
Standard Normal distribution (mean=0, stdev=1). standard_normal(size=None) -> random values |
Standard Student's t distribution with df degrees of freedom. standard_t(df, size=None) |
Triangular distribution starting at left, peaking at mode, and ending at right (left <= mode <= right). triangular(left, mode, right, size=None) |
Uniform distribution over [low, high). uniform(low=0.0, high=1.0, size=None) -> random values |
von Mises circular distribution with mode mu and dispersion parameter kappa on [-pi, pi]. vonmises(mu, kappa, size=None) |
Wald (inverse Gaussian) distribution. wald(mean, scale, size=None) |
Weibull distribution. weibull(a, size=None) |
Zipf distribution. zipf(a, size=None) |
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Tue Jun 3 09:41:18 2008 | http://epydoc.sourceforge.net |