Comments (7)
AdvancedMH was never intended to support explicit reparameterization, since the whole Turing universe prefers to wrap proposal distributions in bijections. We have a whole package for handling these kinds of tasks, Bijectors.jl. Additionally, we think of AdvancedMH as handling more of the inference side rather than the model side, and I think the general sense I've gotten from the team is that bijections are something of a model-side task.
There's a good little demo about working with multivariate bijections here. If you've got a demo you're working with we could try that as well.
from advancedmh.jl.
Is it possible to wrap proposal distributions in bijections as of now? I haven't figured out a simple way to do that, any hints on that would be much appreciated!
Perhaps my use-case is different - I write custom models most of the time (not everything I work with is easy to do within Turing). In cases where people want to use AdvancedMH to do Metropolis-Hastings on a custom model it is often necessary to tweak things, and being able to reparametrise on the fly can be very useful. In my experience 95% of MH is figuring out the right proposal distribution anyway!
from advancedmh.jl.
cc @torfjelde
from advancedmh.jl.
Looks like I got a little confused as to where bijectors went in all these packages. I assumed that they were built into AdvancedHMC but I might have been relying on my personal modifications for that observations. If so, this might be a bigger change than anticipated. I do still think, however, that a simple-to-use reparametrisation layer would be quite convenient, one that Turing could also tap into. This would make the inference functionality in these packages more modular and users wouldn't be forced to make meaningless changes to their models (such as replacing parameters by log-parameters) just because their sampler of choice demands it. :)
from advancedmh.jl.
To be clear, this is not built into AdvancedMH because it is a non-trivial task. A large part of DynamicPPL.jl, Turing's modelling language, is designed to explicitly handle just this unconstrained-to-constrained task.
If you need a lot of complicated bijections or whatever, you should not be using AdvancedMH.jl by itself. You can use the modelling suite in Turing with AdvancedMH built in.
We can try to work with your model though -- do you have an example of what you're trying to sample from?
from advancedmh.jl.
It sort of depends on what you mean by "reparameterised" proposal.
If you're referring to usage of bijections, then the most natural way is to just give AMH.jl the log-density for the /transformed/ variables and define your proposal there instead of defining your proposal in the transformed space but the log-density in "un-transformed" space.
Does that make sense?
from advancedmh.jl.
To be clear, this is not built into AdvancedMH because it is a non-trivial task. A large part of DynamicPPL.jl, Turing's modelling language, is designed to explicitly handle just this unconstrained-to-constrained task.
I see, this might explain why I didn't manage to do it in a few lines. My code is highly WIP and I'm trying to fit multiple models at times, which is why a nice interface for reparametrisation seemed desirable. I'll see if I can clean it up and share whatever I have once it's up and running.
If you're referring to usage of bijections, then the most natural way is to just give AMH.jl the log-density for the /transformed/ variables and define your proposal there instead of defining your proposal in the transformed space but the log-density in "un-transformed" space.
This is precisely it. If we cannot find a simple enough way to incorporate this into AMH.jl I should probably stick to doing it manually for now... :)
from advancedmh.jl.
Related Issues (20)
- Tracking acceptances HOT 4
- Skipping the Hastings computation for symmetric proposals HOT 2
- TagBot trigger issue HOT 25
- Adaptive proposals in Turing composite Gibbs sampler HOT 8
- StructArrays missing in README for MALA HOT 1
- Document basic usage with Turing model HOT 2
- Customized distributions HOT 3
- Array of proposals versus proposals of arrays HOT 1
- Quasi-MH HOT 11
- Negative density in MALA HOT 1
- Multithreaded sampling example in README
- Is Emcee implemented? HOT 6
- Setting up Documenter HOT 2
- Lack of tuning of scale factor for variance of normal proposal
- Fisher adaptive MALA
- RW prior on vectors
- MALA implementation results in the wrong covariance HOT 1
- MethodError in MALA sampler with DensityModel HOT 3
- Compat workflow is broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advancedmh.jl.