-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Make cache vector of same type as u0 #88
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, no reason not to.
Does this fix the autodiff? I assumed it would be something simple. |
It does not due to
|
Oh yes, that would break it... I see. The difference from SDEs to this is that SDEs always use the same way to generate the random numbers (randn()) independently of any state values, and then multiply something to that, so you can treat those as constants. Here the distribution really does need the value of the state, since the rates are dependent on the states and you can't just rescale it by a factor after generating the random numbers. That would make it non-AD differentiable. |
Codecov Report
@@ Coverage Diff @@
## master #88 +/- ##
==========================================
- Coverage 78.55% 78.46% -0.09%
==========================================
Files 21 21
Lines 746 743 -3
==========================================
- Hits 586 583 -3
Misses 160 160
Continue to review full report at Codecov.
|
Well this is necessary anyways. Thanks! |
I'm not sure how you'd do particle sampling of a Poisson RNG? Something to think about though. Make it generate N random outputs? |
Yeah it would draw one sample from each poisson distribution represented by the different particles. |
That might directly require a dispatch on the rand functions. |
Yep, me and Chad Scherrer have been doing some thinking about that here |
No description provided.