Git Product home page Git Product logo

epmgp's Introduction

====================================================================
John P. Cunningham, Columbia University
Copyright (C) 2011 John P. Cunningham, Philipp Hennig, and Simon Lacoste-Julien

Expectation propagation for multivariate gaussian probabilities
(code for the basic routines from Cunningham, Hennig, and Lacoste-Julien, ArXiv, 2011. http://arxiv.org/abs/1111.6832)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
====================================================================

Please cite http://arxiv.org/abs/1111.6832 in any relevant publications.  You may also find this work useful, from my collaborators at Columbia: arxiv.org/pdf/1208.4118 . 

(0) All code requires truncNormMoments.  This is a very numerically stable way to use matlab to calculate the moments of truncated univariate normals.  I recommend you use it.  Otherwise, you will probably run into underflow issues in tail probabilities, which are important test cases for Gaussian integrals.  It is one of my 'utils' functions that gets shared reasonably often.

(1) Based on your application, you may only want axis-aligned hyperrectangles... if so, use axisepmgp.m.  It's a straightforward EP implementation, and quicker than the arbitrary polyhedron version.

(2) Calculate some arbitrary polyhedral integrals...  For that, use epmgp.m, which is "EP for Multivariate Gaussian Probabilities".  It's pretty well commented, so you should be able to use it no sweat.  (you can ignore maxSteps and alphaCorrection, which are some ways we are tweaking  the algorithm... see the latter sections of our ArXiv paper).

(3) Also I include genzmgp.m, which is the numerical guy that we compare against.  It is the state of the art and the best proxy to ground truth.  See our ArXiv paper for more details of that, if you are not clear on that accuracy point already.  genzmgp.m is a wrapper for qsclatmvn.m, the latter of which is horribly written.  But for any accuracy test, I would use genz also.

(4) I include a quick sample of how I might run these things.  The 'run_example.m' file will get you started.

(5) Note: I have extended this EP code to work for arbitrary rank one likelihoods (given a function of that form); contact me if you would like to use that code.

Important: if you are using only axis aligned hyperrectangles, epmgp and axisepmgp give precisely the same result.   If they don't, it's a likely user error.  A common mistake is to specify halfspaces instead of box functions.  Use box functions.

epmgp's People

Watchers

James Cloos avatar Stella avatar

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.