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

Compatibility with ad #138

Open
guaraqe opened this issue Dec 6, 2017 · 1 comment
Open

Compatibility with ad #138

guaraqe opened this issue Dec 6, 2017 · 1 comment

Comments

@guaraqe
Copy link

guaraqe commented Dec 6, 2017

I have been trying to use this package with nonlinear-optimization and ad for maximum likelihood computations, however this is highly non-practical since distributions always return Double -> Double and ad needs some kind of polymorphic interface to work. Are there any barriers for such a polymorphic interface?

One problem I see is the need for different contraints depending on the distribution (Erf for Normal, Num for others).

@Shimuuar
Copy link
Collaborator

Shimuuar commented Dec 6, 2017

Unfortunately there are. Mostly because some distributions use functions like (incomplete) beta/gamma functions. Current implementations in math-functions are specialized to Doubles and making them generic is a lot of work.

To make matter more complicated there are also efficiency concerns. For example for incomplete beta/gamma functions derivative exist in closed form and could be calculated very cheaply without using all complicated approximations.

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