You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduction of SwapSampler + make TemperedSampler a fancy version of CompositionSampler (#152)
* split the transitions and states field in TemperedState
* improved internals of CompositionSampler
* ongoing work
* added swap sampler
* added ordering specification and a TemperedComposition
* integrated work on TemperedComposition into TemperedSampler and
removed the former
* reorederd stuff so it actually works
* fixed bug in swapping computation
* added length implementation for MultiModel
* improved construct for TemperedSampler and added some convenience methods
* fixed bundle_samples for Chains and TemperedTransition
* fixed breaking bug in setparams_and_logprob!! for SwapState
* remove usage of adapted HMC in tests
* remove doubling of iterations when testing tempering
* fixed bugs with MALA and tempering
* relax atol a bit for HMC
* relax another atol
* TemperedComposition is now truly just a wrapper around a CompositionSampler
* added method for computing roundtrips
* fixed testing + added test for roundtrips
* added docs for roundtrips method
* added some tests for SwapSampler without tempering
* remove ordering from SwapSampler since it should only interact with ProcessOrdering
* simplified the sorting according to chains and processes
* added some comments
* some minor refactoring
* some refactoring + TemperedSampler now orders the samplers correctly
* remove expected_ordering and make ordering assumptions more explicit
* relax type-constraints in state_for_chain so it also works with TemperedState
* removed redundant implementations of swap_attempt
* rename swap_betas! to swap!
* moved swap_attempt as it now requires definition of SwapSampler
* removed unnecessary setparams_and_logprob!! that should never be hit
with the current codebase
* removed expected_order
* Apply suggestions from code review
Co-authored-by: Harrison Wilde <[email protected]>
* removed unnecessary variable in tests
* Update src/sampler.jl
Co-authored-by: Harrison Wilde <[email protected]>
* Apply suggestions from code review
Co-authored-by: Harrison Wilde <[email protected]>
* removed burn-in from step in prep for AbstractMCMC improvements
* remove getparams_and_logprob implementation for SwapState as it's
unclear what is the right approach
* split the transitions and states field in TemperedState
* improved internals of CompositionSampler
* ongoing work
* added swap sampler
* added ordering specification and a TemperedComposition
* integrated work on TemperedComposition into TemperedSampler and
removed the former
* reorederd stuff so it actually works
* fixed bug in swapping computation
* added length implementation for MultiModel
* improved construct for TemperedSampler and added some convenience methods
* fixed bundle_samples for Chains and TemperedTransition
* fixed breaking bug in setparams_and_logprob!! for SwapState
* remove usage of adapted HMC in tests
* remove doubling of iterations when testing tempering
* fixed bugs with MALA and tempering
* relax atol a bit for HMC
* relax another atol
* TemperedComposition is now truly just a wrapper around a CompositionSampler
* added method for computing roundtrips
* fixed testing + added test for roundtrips
* added docs for roundtrips method
* added some tests for SwapSampler without tempering
* remove ordering from SwapSampler since it should only interact with ProcessOrdering
* simplified the sorting according to chains and processes
* added some comments
* some minor refactoring
* some refactoring + TemperedSampler now orders the samplers correctly
* remove expected_ordering and make ordering assumptions more explicit
* relax type-constraints in state_for_chain so it also works with TemperedState
* removed redundant implementations of swap_attempt
* rename swap_betas! to swap!
* moved swap_attempt as it now requires definition of SwapSampler
* removed unnecessary setparams_and_logprob!! that should never be hit
with the current codebase
* removed expected_order
* removed unnecessary variable in tests
* Apply suggestions from code review
Co-authored-by: Harrison Wilde <[email protected]>
* removed burn-in from step in prep for AbstractMCMC improvements
* remove getparams_and_logprob implementation for SwapState as it's
unclear what is the right approach
* Apply suggestions from code review
Co-authored-by: Harrison Wilde <[email protected]>
* added CompositionTransition + quite a few bundle_samples with a
`bundle_resolve_swaps` kwarg to allow converting into chains more easily
* more samples
* reduce requirement for ess comparison for AHMC a bit
* significant improvements to the simple Gaussian example, now testing
using MCSE to get tolerances, etc. and small improvements to the rest
of the tests
* trying to debug these tests
* more debug
* fixed typy
* reduce significance even further
---------
Co-authored-by: Harrison Wilde <[email protected]>
#TODO: Change `swap_every` to something like `number_of_iterations_per_swap`.
102
-
swap_every::Integer=1,
156
+
steps_per_swap::Integer=1,
103
157
adapt::Bool=false,
104
158
adapt_target::Real=0.234,
105
159
adapt_stepsize::Real=1,
@@ -109,14 +163,13 @@ function tempered(
109
163
kwargs...
110
164
)
111
165
!(adapt &&typeof(swap_strategy) <:Union{RandomSwap, SingleRandomSwap}) ||error("Adaptation of the inverse temperature ladder is not currently supported under the chosen swap strategy.")
112
-
swap_every ≥1||error("`swap_every` must take a positive integer value.")
166
+
steps_per_swap >0||error("`steps_per_swap` must take a positive integer value.")
0 commit comments