Reputation: 23
I read the source code of Deep Learning by using Python.(Yusuke Sugomori DBN).
I could not understand the meaning of
numpy_rng = numpy.random.RandomState(1234)
. when I type:
>>> import numpy
>>> a = numpy.random.RandomState(1234)
>>> a
it shows <mtrand.RandomState object at 0x100412150>
Is is right? What meaning is this? Any idea , thanks!!
Upvotes: 1
Views: 393
Reputation: 1
You can use like this:
rdm = RandomState(1)
data = rdm.rand(128, 2)
Upvotes: 0
Reputation: 74645
It creates a numpy.random.RandomState
object:
RandomState exposes a number of methods for generating random numbers drawn from a variety of probability distributions.
See numpy.random.RandomState
for the class parameters and the complete list of methods.
Upvotes: 2