Comments (1)
This is possible using the AbstractMCMC
interface with a different callback
keyword argument.
To do it propertly, one should just implement a callback
similar to
AdvancedHMC.jl/src/abstractmcmc.jl
Lines 175 to 194 in 37f0995
AdvancedHMC.jl/src/abstractmcmc.jl
Line 203 in 37f0995
which only shows the progressbar without all the extra information.
Buuut because in the AbstractMCMC-interface impl we only use the HMCProgressCallback
if no callback
is manually specified, e.g.
AdvancedHMC.jl/src/abstractmcmc.jl
Lines 82 to 85 in 37f0995
we can just provide a callback
that does nothing and set progress=true
, which then hits the default progress meter in AbstractMCMC.sample
, which is exactly what you want.
In short, try the following:
# HACK: a callback that does nothing to avoid hitting `HMCProgressCallback`
callback(rng, model, sampler, transition, state, i) = nothing
samples = AbstractMCMC.sample(
model,
sampler,
n_adapts + n_samples;
nadapts = n_adapts,
initial_params = initial_θ,
callback=callback,
progress=true, # will use default progress meter i `AbstractMCMC`
)
from advancedhmc.jl.
Related Issues (20)
- Expose adapted mass matrix
- 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
- More friendly default `sample` interface HOT 9
- 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
- Accessing samples?
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.