controlling seed value

785
4
05-07-2017 12:39 AM
kimkarimi
New Contributor

i am using create spatially balanced points tool. arcgis help says this tool uses a random number generator in its operation which can be controlled in  Random number generator environment. how can i change the seed value from the default value and run this tool with the new seed value?

 

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

The seed value and the generator used is available through the dialog you linked, in the form of...

arcpy.env.randomGenerator = "4 MERSENNE_TWISTER"

either through code or the dialog.  Given there are 3 generators and you can specify the seed number as in the above example, what are you requiring beyond that?

Since it is an Environment Setting, set it within the Environments tab of the tools you are using which provide access to it, or code its generation

kimkarimi
New Contributor

thanks Dan

i want to change the seed value to check how it affects the points that "create spatially balanced points" creates. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

The seed value can then be used either through the arcpy interface, or directly through python or I often use numpy since it offers similar and companion distributions with replication should you need them ie a = np.random.mtrand.RandomState(1).randint(0, 10, size=(N,2)) where N would be the number of point pairs... randint can be replaced as you see fit with alternates in the RandomState class.

0 Kudos
SteveLynch
Esri Regular Contributor

Kim

Changing the seed should not have much of an effect, The value of the cells in the probability raster will have the most effect.

-Steve

0 Kudos