Comments (9)
@sethaxen any thoughts on how to design this API better?
from advancedhmc.jl.
cc @devmotion
from advancedhmc.jl.
But that interface is supported, no? After #301 ?
from advancedhmc.jl.
I think we still need to explicitly construct the Hamiltonian
type or LogDensityModel
type and pass it to the sample
function. Some cosmetic changes are needed in the abstractmcmc
interface implementation to support an intuitive interface like the one in TuringLang/AdvancedMH.jl#76.
from advancedhmc.jl.
I think we still need to explicitly construct the Hamiltonian type and pass it to the sample function
Nah, you can just construct the HMCSampler
and pass that it:)
from advancedhmc.jl.
I think we still need to explicitly construct the Hamiltonian type and pass it to the sample function
Nah, you can just construct the HMCSampler and pass that it:)
@torfjelde can you give an example of what you mean?
In my view a user should be able to entirely configure the warm-up period and sampling period without requiring they specify initializations for step size, metric, and initial point, but allowing for the possibility that they specialize the initializations.
It should also be really easy to configure the warm-up phase(s). e.g. it should be possible to make initial step size selection part of the warm-up phase. It should be possible to initialize the sampling with a metric of one type but then adapt a different type of metric.
Maybe some of these are already possible. If so, awesome! It would be handy to document such cases. If it becomes possible to use Turing models directly with the sampler without needing to define a new sampler as Turing does, that would be amazing!
from advancedhmc.jl.
use Turing models directly with the sampler without needing to define a new sampler as Turing does, that would be amazing!
That's one nice goal for Turing (a by-product of the goal we want thoroughly decouple model specification and inference). We are very close to that point!
from advancedhmc.jl.
I looked at DynamicHMC
's interface mcmc_with_warmup
and mcmc_keep_warmup
. What we need to include here is merely a well-documented user-facing API.
@devmotion, maybe we can make the AbstractMCMC.sample
interface more intuitive so users can have a nice way to specify adaption, initialisation, algorithm choice etc. It seems Julia people love NamedTuple
more than verbose arguments...
from advancedhmc.jl.
maybe we can make the AbstractMCMC.sample interface more intuitive so users can have a nice way to specify adaption, initialisation, algorithm choice etc. It seems Julia people love NamedTuple more than verbose arguments...
AbstractMCMC does not restrict how samplers want their options to be specified, it only adds some standard options such as discard_initial
, thinning
, and progress
: https://turinglang.org/AbstractMCMC.jl/dev/api/#Common-keyword-arguments It's completely up to downstream packages if they want to support these, if they want to add more options (often the case, I assume), and if they want to nest options as named tuples. So I think specifying/changing options in AdvancedHMC does not (necessarily) require any changes in AbstractMCMC.
Generally, I think there's not a single design choice that's used everywhere in the ecosystem. SciML (in most places) uses a large set of (non-nested) keyword arguments, DynamicHMC nests some options in NamedTuple (I guess this might be useful mostly in cases where you have some hierarchy of options), and Optim supports options as Optim.Options
.
from advancedhmc.jl.
Related Issues (20)
- README example fails HOT 3
- Step size initialization uses GLOBAL RNG instead of reproducible RNG from caller
- Forecasting
- Feature request: HMC sampling from convex polytopes defined by linear programs
- Add nuts-rs's metric adaptation HOT 15
- Make `HMCState` stores `rng` in `AbstractMCMC` interface. HOT 5
- Weighted Log Likelihood #featurerequest
- Convinience Constructors HOT 16
- Objects of type LogTargetDensity are not callable HOT 2
- Removing support for AbstractMCMC.Sample piracy HOT 4
- Retest is broken HOT 2
- Moving ReadMe to Docs
- Component Arrays with DenseEuclideanMetric fails HOT 1
- Doc string error for NUTS HOT 2
- `AbstractMCMC.step` interface broken HOT 3
- Define a model HOT 1
- In sample progress=true prints more than a progress-bar HOT 1
- Accessing samples?
- Progress message `ratio_divergent_transitions_during_adaption` bug HOT 1
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 advancedhmc.jl.