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

Why not to implement .nextCategorical by resampling? #3

Open
garyzhubc opened this issue May 22, 2018 · 1 comment
Open

Why not to implement .nextCategorical by resampling? #3

garyzhubc opened this issue May 22, 2018 · 1 comment

Comments

@garyzhubc
Copy link

garyzhubc commented May 22, 2018

.nextCategorical() is using inverCDF to simulate from categorical distributions. Was wondering why not to implement resampling here?

@garyzhubc garyzhubc changed the title More efficient .nextCategorical using table-lookup? More efficient .nextCategorical by resampling? May 22, 2018
@garyzhubc garyzhubc changed the title More efficient .nextCategorical by resampling? Why not to implement .nextCategorical by resampling? May 22, 2018
@alexandrebouchard
Copy link
Owner

Very good point, I had something like that in the back in my mind for some time. A simple solution could be a tree based method to store the probabilities. Alias method is another option but we would have to think if we need cheap update.

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

No branches or pull requests

2 participants