pysal / pointpats

Planar Point Pattern Analysis in PySAL
https://pysal.org/pointpats/
BSD 3-Clause "New" or "Revised" License
83 stars 27 forks source link

`seed` keyword for random distributions? #114

Open jGaboardi opened 1 year ago

jGaboardi commented 1 year ago

I would like to gauge interest in adding a seed keyword for the random distributions in random.py. While results are reproducible by setting a seed manually prior to call a distribution function, it would be beneficial to do so in a more automated fashion. With the initial inclusion of pointpats random distribution in geopandas (https://github.com/geopandas/geopandas/pull/2860), the may be of particular use. Within the sample_points() method over there, a seed keyword can be passed in, but is not used when generating points with pointpats.

cc @martinfleis @ljwolf @knaaptime

martinfleis commented 1 year ago

We should ideally refactor our random-based code paths based on new numpy generator logic (see https://github.com/geopandas/geopandas/blob/b4b10313ab57bf2c55592a28fb99687c9a538fc2/geopandas/tools/_random.py#L42) while doing that.

I am also not sure what should be the keyword called. numpy is using rng, seaborn seed, sklearn random_state and they all mean roughly the same thing...

jGaboardi commented 1 year ago

Yeah, spopt also uses both seed and random_state.

martinfleis commented 1 year ago

That is even better :D