Skip to content

[Feature Request]: Add betaincinv and gammaincinv #413

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

Closed
amyoshino opened this issue Aug 15, 2023 · 3 comments · Fixed by #502
Closed

[Feature Request]: Add betaincinv and gammaincinv #413

amyoshino opened this issue Aug 15, 2023 · 3 comments · Fixed by #502

Comments

@amyoshino
Copy link
Member

amyoshino commented Aug 15, 2023

Before

No response

After

No response

Context for the issue:

I would like to initiate this matter to formally request the inclusion of the following functions:

  • betaincinv: Inverse of the regularized incomplete beta function, or quantile function for the beta distribution.
  • gammaincinv: Inverse to the regularized lower incomplete gamma function.

The implementation of these functions will allow us to implement quantile/ICDF functions for distributions like Beta, Gamma, ChiSquared and StudentT distributions, being fundamental to the issue: pymc-devs/pymc#6845

Some references I think might be useful:

@ricardoV94
Copy link
Member

ricardoV94 commented Aug 15, 2023

That would be really nice. Would you like to take a stab at it?

As a first approach I would try to create symbolic expressions instead of creating new Ops/wrapping C code. This way it will more easily work on other backends later down the road.

You already tooks a look, but again, the scalar gammainc and betainc grads are good examples.

@amyoshino
Copy link
Member Author

I'd be more than happy to give it a try. I will require some guidance as I work on it, and I'll keep you posted with a pull request as soon as I make some headway. Your support is greatly appreciated!

@ricardoV94
Copy link
Member

Happy to help and thanks in advance!

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

Successfully merging a pull request may close this issue.

2 participants