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
Towards v0.2.0 #81
Towards v0.2.0 #81
Conversation
@yebai Can you remind me why the change of metric length trick is necessay? It it for potential dynamic space, or it's also necessary for static HMC? |
src/sampler.jl
Outdated
@@ -55,26 +55,30 @@ function sample( | |||
z = phasepoint(h, θ, r) | |||
pm = progress ? Progress(n_samples, desc="Sampling", barlen=31) : nothing | |||
time = @elapsed for i = 1:n_samples | |||
z, αs[i] = transition(rng, τ, h, z) | |||
z, αs[i], stat = transition(rng, τ, h, z) | |||
θs[i], Hs[i] = z.θ, neg_energy(z) |
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.
Was a bug here: we forgot to add the negative sign to neg_energy(z)
. @yebai
All issues are resolved except from #34 - please check my comment in #34 (comment). For #54, @cpfiffer agrees with that we can stay with returning statistic within single transition using |
…to avoid stackoverlfow in Turing
Looks like this
or this
in AHMC ATM. Looks like this in Turing.jl with MCMCChains.jl ATM.
|
When |
I see. Thanks! |
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.
Thanks, @xukai92. This PR looks correct to me. I made some minor style-related comments below.
TODOs
|
Hi @xukai92, I'm ready to merge this PR once you're happy. |
Great. I will merge it in 30 mins. |
src/adaptation/precond.jl
Outdated
renew( | ||
dem::DiagEuclideanMetric{T,A}, | ||
M⁻¹::A, | ||
sqrtM⁻¹::A=dem.sqrtM⁻¹, |
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.
@yebai I didn't compute the new sqrtM⁻¹
based on the new M⁻¹
.
This PR will address the rest issues in Plan for v0.2 #64
Adapter
types RFCAdapter
types #28AbstractMetric
s Instantiation of newAbstractMetric
s #45SimplifyingMetric
types by usingAbstractPDMat
SimplifyingMetric
types by usingAbstractPDMat
#34