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

Random number generation for non-uniform distributions #2984

Open
9 of 11 tasks
stress-tess opened this issue Feb 16, 2024 · 1 comment
Open
9 of 11 tasks

Random number generation for non-uniform distributions #2984

stress-tess opened this issue Feb 16, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@stress-tess
Copy link
Member

stress-tess commented Feb 16, 2024

There has been user desire for generating random numbers with respect to other distributions (normal in particular). But we should also consider adding other common distributions (power law, binomial, poisson, etc)

Right now we use fillRandom in chpl which doesn't seem to have the ability to specify distributions. I know there are ways of converting uniform into other distributions and bill did a power law conversion for the sort benchmarks. I'd rather not get too custom with it though since random number generation is very easy to mess up

I think we need to dive into how numpy does randomness to try and align ourselves with them as much as possible

here is the full list of functions supported by numpy's generators that have yet to be implemented, categorized according to how important they seem to me (i.e. do I recognize it from the single stats class I've taken?)

remaining np random methods

Prioritized:

Not prioritized at the moment:

@stress-tess stress-tess self-assigned this Feb 16, 2024
@stress-tess stress-tess added the enhancement New feature or request label Feb 16, 2024
@stress-tess
Copy link
Member Author

I found the c code where numpy defines it's distributions. It uses pcg as it's random number generators, same as chapel. So it feels like we could do something similar, but there's more digging to be done to tell how well this ports to chpl

@stress-tess stress-tess modified the milestone: Random module alignment Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant