Giter Club home page Giter Club logo

compiled-inference's Introduction

Local installation command

pip install git+git://github.com/talesa/compiled-inference

Learn proposal distributions for importance sampling and SMC

This code provides a PyTorch implementation of the method described in this paper for training neural networks which can be used as proposal distributions for importance sampling or sequential Monte Carlo:

Paige, B., & Wood, F. (2016). Inference Networks for Sequential Monte Carlo in Graphical Models. In Proceedings of the 33rd International Conference on Machine Learning. JMLR W&CP 48: 3040-3049.

The largest section of re-usable code is an implementation of a conditional variant of MADE as a PyTorch module, found in learn_smc_proposals.cde. This can be used to fit a conditional density estimator. There is a version for real-valued data and a version for binary data.

  • The linear regression notebook provides an end-to-end usage example. This notebook defines a generative model using PyMC, a non-conjugate regression model. It then goes through the process of defining a network which will represent the inverse, training it on samples from the joint distribution, and then using it for inference.

Two more involved examples are implemented in learn_smc_proposals.examples; pre-trained weights are included in this repository. Figures and inference are shown in two notebooks:

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.