Closed martinjrobins closed 1 year ago
I don't think we need it for all problems, do we? I don't want us to get carried away doing lots of nice gradient-based stuff when in real life we hardly ever have them.
(I know there's ways to get them, but they've been around for decades and still don't see much use, that worries me!)
probably start by doing for one easy problem and one hard one to get an idea of how the gradient-based stuff works (presumably after that we can just say "nope, doesn't work").
See also #43 #118
I'll wait until @sanmitraghosh verifies the correctness of the fitzhugh nagumo sensitivities before I merge it in...
Good stuff @martinjrobins - thanks for doing this.
@martinjrobins corrected the FN model in your branch. Have a look.
I think its pretty easy to test if the sensitivities are correct by using theano gradient test. I am attaching here a theano test file I have written for the FN model.
theano_tensorflow_sensitivitytests.zip
@martinjrobins @MichaelClerx
Assuming theano is installed, extract the file and run
theano-nose test_pintsModelSens.py
To do the same with tensorflow run the attached jupyter notebook.
Thanks @sanmitraghosh for testing the gradient
@martinjrobins I have uploaded these files now in master branch studies folder. commit issue-298-sensitivities
Now that we have an easy one and a hard one, shall we close this ticket?
@martinjrobins says yes
@martinjrobins @MichaelClerx Think we do need this for the toy pdfs (and they're easy to do) so am reopening.
@ben18785 which ones specifically? Can you update the list at the top?
@MichaelClerx Have done so. I am happy to add these to be honest -- shouldn't take too long for the toy pdfs.
I think we've got plenty now that have sensitivities, so closing this!
Not sure we have many toy models (not toy distributions). Can we keep this open please?
On Mon, Aug 19, 2019 at 10:59 AM Michael Clerx notifications@github.com wrote:
Closed #298 https://github.com/pints-team/pints/issues/298.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/pints-team/pints/issues/298?email_source=notifications&email_token=ABCILKB3HE6UDXDJTAX6IA3QFJVGNA5CNFSM4EXY7W52YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTDXA2FA#event-2565737748, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCILKE6BC2V44OZGBVNQHTQFJVGNANCNFSM4EXY7W5Q .
If you have some idea for how to implement it, then yes. The ones I've looked at (SIR, hes1, Lotka-Volterra, Repressilator) all use scipy to integrate an ODE, so don't offer an easy way to obtain the sensitivities. This is fine by me, as it reflects the real-world situation
Yep, I think either getting sensitivities via the Jacobian method or (better) using adjoints is fine. I'd also be happy if this were implemented in a notebook to show others how to do it...
On Mon, Aug 19, 2019 at 11:07 AM Michael Clerx notifications@github.com wrote:
If you have some idea for how to implement it, then yes. The ones I've looked at (SIR, hes1, Lotka-Volterra, Repressilator) all use scipy to integrate an ODE, so don't offer an easy way to obtain the sensitivities. This is fine by me, as it reflects the real-world situation
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/pints-team/pints/issues/298?email_source=notifications&email_token=ABCILKAGZUT6R7R66VFHPPLQFJWGBA5CNFSM4EXY7W52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4SMGOY#issuecomment-522502971, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCILKAWCM73EBFUOFVV5C3QFJWGBANCNFSM4EXY7W5Q .
Well, feel free! But maybe we should pick a specific model and create an issue for that? I don't want to give the impression that it's a requirement for all toy models/problems to have sensitivities implemented
pretty sure the fitzhugh nagumo model uses the Jacobian method to get the sensitivities
Perhaps see https://github.com/pints-team/pints/issues/501
Is that enough to play with @ben18785 ? Can we shut this issue now?
Many addressed in #1038 now. I'd be happy to shut this issue
Let's keep it open as have a few ones here I still want to implement
On Tue, Mar 31, 2020 at 5:38 PM Michael Clerx notifications@github.com wrote:
Many addressed in #1038 https://github.com/pints-team/pints/pull/1038 now. I'd be happy to shut this issue
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pints-team/pints/issues/298#issuecomment-606740090, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCILKCCNSEMNOL73SEWL33RKIMATANCNFSM4EXY7W5Q .
Some more weren't ticked off. Remaining ones are all tricky. Closing this as initial issue (need for some gradients to test gradient-based samplers) has been more than met.
Many other tickets refer to gradient based methods (#22 #283 #293 #104). First step is to implement gradients for the toy problems
Not doing: