Skip to content
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

stepsize bug in MCMC #182

Closed
odunbar opened this issue Sep 26, 2022 · 0 comments · Fixed by #188
Closed

stepsize bug in MCMC #182

odunbar opened this issue Sep 26, 2022 · 0 comments · Fixed by #188
Assignees

Comments

@odunbar
Copy link
Collaborator

odunbar commented Sep 26, 2022

if doubled && halved
stepsize = 0.75 * stepsize
doubled = false
halved = false
elseif acc_ratio < 0.15
stepsize = 0.5 * stepsize
halved = true
elseif acc_ratio > 0.35
stepsize = 2.0 * stepsize
doubled = true
else

Just noticed that the order of doubled and halved matters here. i.e. if you have a situation where a good step is value 1.5*init_step then the search will do

init_step =>  acc_ratio = 36% => doubled = true
2*init_step => acc_ratio= 13% => halved = true

then the next step is 0.75*(2*init_step) = 1.5*init_step which makes sense.

But if a good step is value is 0.75*init_step then the search will do

init_step =>  acc_ratio = 13% => halved = true
0.5*init_step => acc_ratio= 36% => doubled = true

then the next step will do 0.75*(0.5*init_step) = 0.375*init_step which does not make sense.

likely my fault from previous iteration. Didn't catch it earlier, because as 0.375*step is too small the next iteration will double it to 0.75*init_step so it will usually still find a good value but it's not efficient.

We should include the order dependence.

@odunbar odunbar changed the title stepsize bug stepsize bug in MCMC Sep 26, 2022
bors bot added a commit that referenced this issue Oct 1, 2022
188: remove manifest, fix mcmc performance r=odunbar a=odunbar

## Purpose 
Removes manifest from project. Doing so caused performance hit, changed offending lines to regain performance.

## Content
- Fixes #184 
- Fixes #182 
- soft-fix for #169
- updates EKP compat to 0.13

Co-authored-by: odunbar <odunbar@caltech.edu>
@bors bors bot closed this as completed in 8d87f44 Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants