Skip to content

Conversation

bdeonovic
Copy link

Chain rules for partial derivatives of incomplete beta. Code is by @arzwa and taken from

https://github.com/arzwa/IncBetaDer/blob/main/src/beta_inc_grad.jl

Related to effort to provide julia implementations of pdf/cdf like functions (JuliaStats/StatsFuns.jl#113) and associated problems (JuliaStats/Distributions.jl#1334)

Chain rules for partial derivatives of incomplete beta. Code is by @arzwa and taken from 
https://github.com/arzwa/IncBetaDer/blob/main/src/beta_inc_grad.jl
Related to effort to provide julia implementations of pdf/cdf like functions (JuliaStats/StatsFuns.jl#113) and JuliaStats/Distributions.jl#1334
@bdeonovic
Copy link
Author

The algorithm used to compute the partial derivatives doesn't seem very accurate (I had to go down to atol=0.1 in the tests). I'll see if any other languages use a different algorithm

@bdeonovic
Copy link
Author

After reviewing the algorithms used for incomplete beta it is obvious that different approximations perform better in different domains of input variables. Unfortunately I have only found derivations of partial derivatives for a continued fraction approximation of incomplete beta (however not the one we are using for the incomplete beta).

We can put these derivatives in place while acknowledging that they are not be accurate for all ranges of inputs, or we can hold off until someone derives partial derivatives for more of the approximation methods (if that is even possible).

Thoughts?

@bdeonovic
Copy link
Author

bdeonovic commented Dec 2, 2021

For my future self:
https://duetosymmetry.com/notes/take-derivative-continued-fraction/

https://dlmf.nist.gov/8.17#ii

Boik, R. J., & Robinson-Cox, J. F. (1998).

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

Successfully merging this pull request may close these issues.

1 participant