-
-
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
metrop_accept returns whether the sample was accepted #2058
Conversation
pymc3/step_methods/arraystep.py
Outdated
@@ -6,7 +6,7 @@ | |||
from numpy.random import uniform | |||
from enum import IntEnum, unique | |||
|
|||
__all__ = ['ArrayStep', 'ArrayStepShared', 'metrop_select', 'Competence'] | |||
__all__ = ('ArrayStep', 'ArrayStepShared', 'metrop_select', 'Competence') |
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.
Why this? I'm confused :)
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.
The rest looks fine to me except I don't understand the brackets change.
Ah shoot, I can remove that, though I think it is generally "better". My linter was complaining that when |
No that's a good reason! However for consistency we'd need to change ALL
the `__all__`
…On Wed, Apr 19, 2017 at 3:35 PM, Colin ***@***.***> wrote:
Ah shoot, I can remove that, though I think it is generally "better". My
linter was complaining that when __all__ is a list, it is mutable so it
is harder to tell what functions are exported.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2058 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA8DiJA1CfvGei6e-LnOVFBay7V7oFFLks5rxg2YgaJpZM4NBqFV>
.
--
Peadar Coyle
Skype: springcoilarch
www.twitter.com/springcoil
peadarcoyle.wordpress.com
|
I don't think it is a big deal either way. Actually, just found a surprisingly contentious issue in |
9c96a75
to
93f33ee
Compare
@ColCarroll Nice refactor. Is acceptance already stored in the sampler stats? |
It doesn't look like any of the stats returns the acceptance ratio yet, but
that could be added.
…On Wed, Apr 19, 2017 at 9:56 AM Thomas Wiecki ***@***.***> wrote:
@ColCarroll <https://github.com/ColCarroll> Nice refactor. Is acceptance
already stored in the sampler stats?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2058 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACMHEII4YbF3QBqCAUdyqwr_zVskOPE2ks5rxhKFgaJpZM4NBqFV>
.
|
Can do that separately and merge once tests pass. |
Do you want to add acceptance to the sampler stats in a separate PR before merging this? I think it stands on its own, but can do that. |
With the metropolis acceptance step, we were always (except in
HamiltonianMC
) checking whether a proposal had been accepted just after returning. This makesmetrop_accept
return a tuple instead, and I think makes the code a little more readable.