Raw random provides the random-number drawing functionality, that underlies the friendlier RandomStreams interface.
This is the interface for the theano.tensor.shared_randomstreams.RandomStreams subclass and the theano.tensor.randomstreams.RandomStreams subclass.
Sample n times with probability of success prob for each trial, return the number of successes.
If the size argument is ambiguous on the number of dimensions, the first argument may be a plain integer to supplement the missing information.
Sample a tensor of given size whose element from a uniform distribution between low and high.
If the size argument is ambiguous on the number of dimensions, the first argument may be a plain integer to supplement the missing information.
Usage: normal(random_state, size, Sample from a normal distribution centered on avg with the specified standard deviation (std)
If the size argument is ambiguous on the number of dimensions, the first argument may be a plain integer to supplement the missing information.
Usage: random_integers(random_state, size, low=0, high=1) Sample a random integer between low and high, both inclusive.
If the size argument is ambiguous on the number of dimensions, the first argument may be a plain integer to supplement the missing information.
Returns permutations of the integers between 0 and n-1, as many times as required by size. For instance, if size=(p,q), p*q permutations will be generated, and the output shape will be (p,q,n), because each permutation is of size n.
Theano tries to infer the number of dimensions from the length of the size argument, but you may always specify it with the ndim parameter.
Note
Note that the output will then be of dimension ndim+1.
Sample n times from a multinomial distribution defined by probabilities pvals, as many times as required by size. For instance, if size=(p,q), p*q samples will be drawn, and the output shape will be (p,q,len(pvals)).
Theano tries to infer the number of dimensions from the length of the size argument, but you may always specify it with the ndim parameter.
Note
Note that the output will then be of dimension ndim+1.
Return a variable with every row (rightmost index) shuffled.
This uses permutation random variable internally, available via the .permutation attribute of the return value.
A Type for variables that will take numpy.random.RandomState values.
Return a new Variable whose .type is random_state_variable.
Op that draws random numbers from a numpy.RandomState object. This Op is parametrized to draw numbers from many possible distributions.
Sample from a uniform distribution between low and high.
If the size argument is ambiguous on the number of dimensions, the first argument may be a plain integer to supplement the missing information.
Returns: | RandomVariable, NewRandomState |
---|
Sample n times with probability of success prob for each trial, return the number of successes.
If the size argument is ambiguous on the number of dimensions, the first argument may be a plain integer to supplement the missing information. :returns: RandomVariable, NewRandomState
Sample from a normal distribution centered on avg with the specified standard deviation (std)
If the size argument is ambiguous on the number of dimensions, the first argument may be a plain integer to supplement the missing information.
Returns: | RandomVariable, NewRandomState |
---|
Sample a random integer between low and high, both inclusive.
If the size argument is ambiguous on the number of dimensions, the first argument may be a plain integer to supplement the missing information.
Returns: | RandomVariable, NewRandomState |
---|
Returns permutations of the integers between 0 and n-1, as many times as required by size. For instance, if size=(p,q), p*q permutations will be generated, and the output shape will be (p,q,n), because each permutation is of size n.
If the size argument is ambiguous on the number of dimensions, the first argument may be a plain integer i, which should correspond to len(size). Note that the output will then be of dimension i+1.
Returns: | RandomVariable, NewRandomState |
---|
Sample from a multinomial distribution defined by probabilities pvals, as many times as required by size. For instance, if size=(p,q), p*q samples will be drawn, and the output shape will be (p,q,len(pvals)).
If the size argument is ambiguous on the number of dimensions, the first argument may be a plain integer i, which should correspond to len(size). Note that the output will then be of dimension i+1.
Returns: | RandomVariable, NewRandomState |
---|