-
Notifications
You must be signed in to change notification settings - Fork 9
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
Enable AD for Nmixture models #25
base: AD-rc0
Are you sure you want to change the base?
Conversation
@weizhangstats Looks like a problem with the Github Action config rather than your code. I'll look into it. |
I've got it working up through executing the tests, but test-AD.R is failing. |
Hey Ben @dochvam, I updated the tests for N-mixture models which passed on my machine with nimble 1.1.0 (the version on CRAN) installed. It seems nimble 1.0.0 is used for the tests on GitHub. I tried to make it install nimble from CRAN but did not work. Anyway, it is worth having a look at why all the AD tests do not pass with the latest nimble on devel or nimble 1.0.0. |
@weizhangstats @dochvam I am looking at this, with apologies for such delay. Do we want to provide AD and non-AD versions of the Nmixture distributions? Here are two reasons why we might.
The other distributions in this package will be getting AD support without a proliferation of new AD-specific cases. However for Nmixture do we want non-AD versions that (as before) allow default |
@perrydv You've laid out the arguments nicely. I agree that we should retain functionality from both AD and non-AD versions of dNmixture, so non-AD users can take advantage of the tricks. Is it the case that, by default, we expect most users to not use AD versions, and that users who want AD versions will be actively thinking about that? If so, I suggest keeping the current dNmixture functions as-is, and defining new, separately named functions for AD. Maybe with the additional suffix AD, e.g. |
Totally agreed on the AD and non-AD opinion, @perrydv. And yes a good idea to keep the non-AD functions and add AD ones as new. |
@dochvam @perrydv I created a branch based on the AD-rc0 branch to make the AD work for N-mixture models. This PR lets you see what has been changed. For some of the distributions requiring q** functions to calculate Nmin and Nmax, I disabled this which is not supported by AD.