GithubHelp home page GithubHelp logo

bbvi's Introduction

Python Code for BBVI - 4D-Gaussian Example

This is the Python implemetnation Rajesh et. al's Black Box Variational Inference for a simple 4-d Gaussian model. The code is here more as a proof of concept that this works and contains the AdaGrad extension along with the MCCV needed to control the variance of the estimator. It should be in theory easy to modify this to work with a different model by replacing the gradient of the variational distribution (the Gaussian) with your distribution of choice as well as the log joint probability of the model.

Package Requirements

Pandas Numpy Matplotlib Seaborn Scipy

Running this Code

To run simply type: python bbvi_simple.py

Plots Generated

bbvi_gaussian_samples.png - A scatter plot of the first two dimensions for the prior / likelihood / posterior. bbvi_gaussian.png - A facet plot that shows the sample paths for the various implementations of BBVI where the learning rate can be either Robbins-Monroe or AdaGrad and whether Markov Control Variates are used. The diagonal plots represent a histogram of the samples collected from every iteration of BBVI where the yellow represents the true value (made slightly larger for visibility).

alt tag alt tag

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.