Git Product home page Git Product logo

epwx's Introduction

EPwx - sparse PCA using EP

Introduction

Matlab code for Bayesian sparse principal component analysis with Gaussian and/or probit likelihoods and spike and slab sparse prior. Inference methods:

  • Expectation propagation (EP),
  • Hybrid variational bayes - EP (VB-EP),
  • Gibbs sampling.

Warning: The code is not "production quality".

Installation

EP and Gibbs sampling use C++ code, which needs to be compiled in Matlab using mex. The code requires Eigen matrix library. Eigen doesn't require any installation: just download and unzip it. To compile the C++ code, type in Matlab command line (after replacing "/path/to/eigen/" with the location of the unzipped Eigen library):

mex -largeArrayDims -I/path/to/eigen/ ep_wx_parallelep_factcov.cpp
mex CXXFLAGS="\$CXXFLAGS -std=c++0x" -largeArrayDims -I/path/to/eigen/ gibbs_wx_probit_half_normal_sampling_nomatlab.cpp

Usage

See example.m for an example.

Reference

Peltola, Jylänki, Vehtari. Expectation propagation for likelihoods depending on an inner product of two multivariate random variables. In JMLR Workshop and Conference Proceedings: AISTATS 2014, volume 33, p. 769-777. (link)

The EP-VB hybrid algorithm and Gibbs sampling are described in Rattray, Stegle, Sharp, Winn (2009) Inference algorithms and learning theory for Bayesian sparse factor analysis. Journal of Physics: Conference Series, 197(1).

Acknowledgements

Code for the truncated normal sampling used in the Gibbs sampling for probit likelihood is by Nicolas Chopin. The original code is available at https://sites.google.com/site/nicolaschopinstatistician/software and has been adapted for the mex-file.

Changes

2014-04-16 (first release)

  • The code has been slightly updated from the version used in the AISTATS2014 article, but should give similar results.
  • Minor updates to EP and VB-EP approximation initializations.
  • EP uses Newton iterations to refine the end-point for the numerical integration.

Contact

Tomi Peltola, [email protected] http://becs.aalto.fi/en/research/bayes/epwx/

License

GPLv2, see http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.

epwx's People

Stargazers

 avatar

Watchers

 avatar

Forkers

mfzhang

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.