Skip to content

SIS MCMC redux #760

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

Closed
wants to merge 9 commits into from
Closed

SIS MCMC redux #760

wants to merge 9 commits into from

Conversation

MichaelClerx
Copy link
Member

Updated version of SIS MCMC PR, after history changes on master

Old PR: #709

@MichaelClerx MichaelClerx requested review from ben18785 and removed request for ben18785 May 23, 2019 18:01
@codecov
Copy link

codecov bot commented Jun 3, 2019

Codecov Report

Merging #760 into master will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #760      +/-   ##
========================================
+ Coverage   99.94%   100%   +0.05%     
========================================
  Files          52     52              
  Lines        5021   5016       -5     
========================================
- Hits         5018   5016       -2     
+ Misses          3      0       -3
Impacted Files Coverage Δ
pints/_mcmc/_population.py 100% <0%> (ø) ⬆️
pints/_optimisers/_xnes.py 100% <0%> (ø) ⬆️
pints/_optimisers/_snes.py 100% <0%> (ø) ⬆️
pints/toy/_twisted_gaussian_banana.py 100% <0%> (ø) ⬆️
pints/_optimisers/_pso.py 100% <0%> (ø) ⬆️
pints/_optimisers/__init__.py 100% <0%> (+0.6%) ⬆️
pints/_optimisers/_cmaes.py 100% <0%> (+1.38%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5c0af5...0bded21. Read the comment docs.

@MichaelClerx MichaelClerx mentioned this pull request Sep 3, 2019
49 tasks
@ben18785
Copy link
Collaborator

@MichaelClerx I'm trying to think of the best way to implement this method (as it's one of the remaining methods in #917).

But it's not really a method. More a framework that can be applied to any sampling (or optimisation) routine.

For sampling, all it does is:

  • 'heats up' distribution according to some temperature,
  • samples on the tempered distribution using whatever method; recording the log-posterior of each sample (do we have functionality to do this?,
  • reweights samples based on importance sampling using the log-posterior values as weights.

For optimisation, all it does is heat up the distribution then runs whatever optimiser on it.

So, I was thinking, perhaps MCMCController, NestedController and OptimisationController could just have an optional argument temperature which, by default, is zero. If it is non-zero, the methods form the heated distribution and (for sampling methods) ensure that the log-posterior values are recorded.

What do you think?

@MichaelClerx
Copy link
Member Author

Interesting!

I see what you mean, and there's certainly meta methods for optimisation as well.

But I think there's more than 1 meta-sampler, so sticking it in MCMCController might not be the way to go.

Could we implement this like some of the other samplers, with an option to change whatever underlying sampler you use? Then you'd also get all the log-posteriors, because:

class SISMCMC(...)
...
def ask(...)
    return self._inner_sampler.ask()
def tell(self, log_posterior)
    # store log posterior
    return self._inner_sampler.tell(log_posterior)       

@ben18785
Copy link
Collaborator

@MichaelClerx Good idea! I'll do it like that.

@MichaelClerx
Copy link
Member Author

Hey @ben18785 , do you remember why we closed this? Can I delete the branch as well?

@MichaelClerx MichaelClerx deleted the SIS-MCMC-redux branch February 26, 2020 12:41
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 this pull request may close these issues.

2 participants