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

What about gamma_inc_inv's derivative ? #452

Open
lrnv opened this issue Oct 31, 2023 · 2 comments
Open

What about gamma_inc_inv's derivative ? #452

lrnv opened this issue Oct 31, 2023 · 2 comments

Comments

@lrnv
Copy link

lrnv commented Oct 31, 2023

I am hitting the following issue :

ERROR: MethodError: no method matching __gamma_inc_inv(::ForwardDiff.Dual{...}, ::ForwardDiff.Dual{...}, ::Bool)

Is there somewhere an implementation for such a derivative ? I guess the routines for the inverse of the gamma incomplete function are based on numerical root finding, so it that even possible ?

@stevengj
Copy link
Member

There are analytical formulas for the derivatives. One of them is fine, but the other involves the Meijer G function, which we don't have (#265).

We could add a chain rule for the derivative with respect to the second argument, but ForwardDiff doesn't support ChainRules (unless you also import https://github.com/ThummeTo/ForwardDiffChainRules.jl, which we don't currently do here).

@lrnv
Copy link
Author

lrnv commented Nov 2, 2023

It looks like the derivatives you linked to on wikipedia are for the gamma incomplete function, and not its inverse, if I am not mistaking.

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