Giter Site home page Giter Site logo

rlouf / blog-benchmark-rwmetropolis Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 5.0 43 KB

Code to reproduce the results of ๐Ÿ‘‡

Home Page: https://www.thetypicalset.com/blog/jax-parallel-mcmc.html

Python 52.42% Shell 3.08% Jupyter Notebook 44.51%

blog-benchmark-rwmetropolis's Introduction

Rรฉmi Louf / Twitter / Linkedin / Mastodon

I am a statistician (some say data scientist) and software developer. I am particularly interested in Bayesian statistics and generative modeling, MCMC samplers and symbolic programming.

I am the author of Blackjax and a core member of Aesara.

blog-benchmark-rwmetropolis's People

Contributors

mattjj avatar rlouf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

blog-benchmark-rwmetropolis's Issues

sign in logpdf

Dear contributors,

if I'm not mistaken, there is a typo in the sign of the mixture_logpdf(x) output. The last line of that function shouldn't have a minus, thus

`return logsumexp(np.log(weights) + log_probs, axis=0)`

Fortunately, the scale of your proposal distribution is so small that the acceptance rate is close to 1. Thus the sampler does not explode and your results shouldn't change much.

Best, AT

PS: in the blog to the notebook there is even a second minus sign in the same line, which shouldn't be there

Edit: As much as I see Colin Carroll doesn't have any of the minuses

mistake in the mixture log prob computation

The mixture log prob is evaluated on the whole observation, instead of each dimension:
instead of:

log_probs = np.array([dist_1(x[0]), dist_2(x[1]), dist_3(x[2]), dist_4(x[3])])

it should be

log_probs = np.array([dist_1(x), dist_2(x), dist_3(x), dist_4(x)])

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.