stellalee / epmgp Goto Github PK
View Code? Open in Web Editor NEWThis project forked from cunni/epmgp
expectation propagation for multivariate gaussian probabilities
This project forked from cunni/epmgp
expectation propagation for multivariate gaussian probabilities
==================================================================== 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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.