Git Product home page Git Product logo

variationalapproxexample's Introduction

VariationalApproxExample

An example of variational approximation for Gaussian process classification. To run this code, download the code in a directory, and do following in MATLAB,

$ addpath(genpath(pwd))
$ example

We generate synthetic classification data (yi,Xi). We assume a GP prior with zero mean and a linear Kernel with a logit likelihood to generate binary data.

As a simple example of variational approximation, we will fit an approximate Gaussian posterior N(m,V) with a restriction that the diagonal of V is 1. Our goal is to find m and V.

We will use the KL method of Kuss and Rasmussen, 2005 and solve the following optimization problem to find m:

max_m f(m) = -(m-mu)'Omega(m-mu)/2 + sum_i fi(yi,mi,1)

where Omega is inverse of GP covariance matrix, mu is the mean, and fi = E(log p(yi|xi)) wrt N(xi|mi,1) of the logit likelihood p(yi|xi) = exp(yi*xi)/(1+exp(xi))

We use LBFGS implemented in minFunc by Mark Schmidt http://www.di.ens.fr/~mschmidt/Software/minFunc.html

The implementation of fi for logit likelihood is based on the following ICML paper (also see the Appendix )

variationalapproxexample's People

Contributors

emtiyaz 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.