Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seed keyword for random distributions? #114

Open
jGaboardi opened this issue Aug 9, 2023 · 3 comments
Open

seed keyword for random distributions? #114

jGaboardi opened this issue Aug 9, 2023 · 3 comments

Comments

@jGaboardi
Copy link
Member

jGaboardi commented Aug 9, 2023

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 (geopandas/geopandas#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
Copy link
Member

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
Copy link
Member Author

Yeah, spopt also uses both seed and random_state.

@martinfleis
Copy link
Member

That is even better :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants