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

Derivatives of Bessel functions with respect to the order #292

Closed
oxinabox opened this issue Jan 5, 2021 · 2 comments
Closed

Derivatives of Bessel functions with respect to the order #292

oxinabox opened this issue Jan 5, 2021 · 2 comments

Comments

@oxinabox
Copy link
Contributor

oxinabox commented Jan 5, 2021

Transefering from JuliaDiff/ChainRules.jl#208
more details in that thread.

@devmotion said:

In https://www.tandfonline.com/doi/pdf/10.1080/10652469.2016.1164156, closed-form expressions were derived for the derivatives of Bessel functions with respect to the order. Currently these are not implemented (they are defined as NaN). These derivatives are useful, e.g., when working with the Matern kernel (see JuliaGaussianProcesses/KernelFunctions.jl#116 (comment)).

It feels a bit problematic that these expressions involve hypergeometric functions and hence probably would introduce a dependency on HypergeometricFunctions.jl. Before putting together any PRs, I would like to know what's the preferred way in ChainRules to deal with such dependencies that are only needed for computing the derivatives? I assume as well that maybe one should use the @thunk macro to avoid these rather lengthy calculations if one is not interested in the derivatives with respect to the order?

NB: they are now defines as a thunked error.
Not having these causes problems for an AD that unthunked everything, including things that are not consumed.
Which is not an ideal behavour, but it is the behavour of Zygote for now (hopefully will change soon) FluxML/Zygote.jl#873.
but more significantly, not having these means we can't take deriviative with respect to this.

@devmotion
Copy link
Member

Possible duplicate: #160

@oxinabox
Copy link
Contributor Author

oxinabox commented Jan 6, 2021

confirmed duplicate

@oxinabox oxinabox closed this as completed Jan 6, 2021
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