-
-
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
Don't tune DEMetropolis by default #3743
Don't tune DEMetropolis by default #3743
Conversation
+ tune argument now one of None,scaling,lambda + support for tuning lambda (closes pymc-devs#3720) + added test to check checking of tune setting + both scaling and lambda are recorded in the sampler stats
6ea007e
to
80523ba
Compare
Codecov Report
@@ Coverage Diff @@
## master #3743 +/- ##
==========================================
- Coverage 90.41% 90.08% -0.33%
==========================================
Files 133 133
Lines 20344 20361 +17
==========================================
- Hits 18394 18343 -51
- Misses 1950 2018 +68
|
Just out of curiosity, have you tried testing if the 3 scaling options makes sense for a multimodal posterior (like the two gaussians example for SMC) and for a hierachical model? |
LGTM! |
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.
LGTM. I am wondering if it make sense/possible to do both?
Why
Until now, our implementation tunes
scaling
, which is a bit pointless, because as soon as the population spreads much more than the scaled proposal distribution, it doesn't really make a difference. Only in situations wheren_chains < n_dim+1
, tuningscaling
should have a real impact, but that's not recommended anyways and since #3719 we have a warning about that.As I mentioned in #3720, Nelson et al. (2013), section 4.1.2 describes a procedure where they tune
lambda
. For non-Normal densities, where the2.38/sqrt(2*ndim)
rule of thumb is not necessarily the best setting, this sounds like a great idea. However, tuninglambda
can lead to swing-in effects if convergence to the typical set takes a significant part of the tuning phase.I compared all three settings (None, scaling, lambda) on a 50-dimensional MvNormal, but there's no clear winner.
To compromise, I propose to tune neither
scaling
norlambda
by default, but allow the user to tune either of them if they wish to.Changes
tune
argument toDEMetropolis
now one of{None,scaling,lambda}