# Adaptive proposals in AdvancedMH.jl (or other Metropolis-capable) package

**URL:** <https://discourse.julialang.org/t/adaptive-proposals-in-advancedmh-jl-or-other-metropolis-capable-package/110837>\
**Category:** Performance\
**Tags:** mcmc\
**Created:** [February 27, 2024, 9:42am UTC](https://discourse.julialang.org/t/adaptive-proposals-in-advancedmh-jl-or-other-metropolis-capable-package/110837 "2024-02-27T09:42:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![caesoma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/caesoma/32/219651_2.png) [@caesoma](https://discourse.julialang.org/u/caesoma)\
**Post date:** [February 27, 2024, 9:42am UTC](https://discourse.julialang.org/t/adaptive-proposals-in-advancedmh-jl-or-other-metropolis-capable-package/110837/1 "2024-02-27T09:42:03Z")

</div>

I am trying to run an MCMC chain with a Metropolis-Hastings sampler, but a fixed proposal distribution normally yields poor results. Apparently the [AdvancedMH.jl](https://github.com/TuringLang/AdvancedMH.jl) package doesn’t have the feature for tuning the variance of the proposal distribution that is commonly available in MH samplers.

I asked about this features in [another topic](https://discourse.julialang.org/t/tune-metropolis-hastings-normal-distribution-scale-parameters-and-algorithms-parameters-in-general/104925/11) and it was suggested I [opened an issue](https://github.com/TuringLang/AdvancedMH.jl/issues/91), but there I didn’t get any response on that. I am not sure if the package is still actively maintained, so instead I am wondering if this could be achieved without actually implementing the missing feature.

My question, therefore, is the following:

- Within the existing implementation of AdvancedMH.jl, is it possible to change the variance of the proposal distribution based on the acceptance rate for the previous `N` samples?

Thank you.
