-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
improve ABC sampler #3940
improve ABC sampler #3940
Conversation
Check out this pull request on Review Jupyter notebook visual diffs & provide feedback on notebooks. Powered by ReviewNB |
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.
I'm no expert on the sampler per se, so I'll defer to more experienced people on the guts of the sampler.
With that in mind, this looks good to me and will be useful when porting chapter 16 of Rethinking 2 😉
I just added some comments on the NB, with the goal of gradually standardizing our NBs galleries.
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.
I'm not familiar with the sampler either, but I assume you've tested it thoroughly?
The breaking API changes should be mentioned in the release notes.
Distance function. The only available option is ``gaussian_kernel`` | ||
sum_stat: str or callable | ||
Summary statistics. Available options are ``indentity``, ``sorted``, ``mean``, ``median``. | ||
If a callable is based it should return a number or a 1d numpy array. |
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.
These breaking changes should be mentioned in the release notes
It should work, but I guess pm.ode will work better. |
Thanks for the comments! |
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.
All good now, thanks @aloctavodia 👌
I'll let @michaelosthege merge once he approves the changes
Simplify the specification of the abc sampler as previously we had a distance and a kernel with was redundant. Now we only have a gauss_kernel as the only one distance (in a future PR I will probably add more distances, but I need to do some reading and testing before that). This also adds more flexibility to define summary statistics, including user defined statistics. Finally this allows to define more complex models as the simulator can be feed with a subset of the prior parameters.