This repository contains both MATLAB and R code for implementing the Bayesian GP-LVM. The MATLAB code is in the subdirectory vargplvm, the R code in vargplvmR.
For a quick description and sample videos / demos check:
http://git.io/A3Uv
The Bayesian GP-LVM (Titsias and Lawrence, 2010) is an extension of the traditional GP-LVM where the latent space is approximately marginalised out in a variational fashion (hence the prefix 'vargplvm').
Let us denote
The Bayesian GP-LVM allows for approximately marginalising out
a. As a by-product we also obtain the approximate posterior by
In vargplvm, we can think as the means mu to replace the estimates for
In the standard Bayesian GP-LVM,
- Variational Gaussian process dynamical systems (VGPDS), Damianou et. al, 2011
What happens when we have some prior information regarding the nature
of our observations
You can also think as t being an observed input to the whole process. This can be a temporal vector, class labels or whatever. Thus, the VGPDS extension can be seen as a supervised version of the previous model, the Bayesian GP-LVM. The code is written with a notation which assumes temporal t, but you can think of t being any sort of multi-dimensional input without changing a single line in the code.
Formally, if
and
-
Reparameterization: In contrast to the
$q$ diagonal covariance matrices Sigma of$q(\mathbf{X}) \sim \mathcal{N}(\mu, \Sigma)$ of Baysian GP-LVM, in VGPDS each of the$q$ $Sigma_j$ is full-rank$n\times n$ making optimisation very challenging. In VGPDS a reparameterization trick is used so that each$\Sigma_i$ can be reparameterized with a vector$\lambda_i$ which is$n \times 1$ (equivalently, a diagonal matrix$\Lambda_i$ ). -
Initialising the reparameterized values It turns out (please consult paper) that
$\Lambda_i$ is depends on$\Sigma_i$ in a complex way. Since we now have access only to$\Lambda_i$ as free parameters and not to$\Sigma_i$ directly, it is difficult to initialise$\Sigma_i$ to our desired values (ideally,$\Sigma_i$ would take initial values in the range of 0.1 to 0.5). The code implements a simple brute force method which picks a reasonable initial$\Lambda_i$ .
Matlab code contains implementations of:
- (1) the Bayesian GPLVM (see Titsias and Lawrence, AISTATS 2010)
- (2) Variational Gaussian Process Dynamical Systems (VGPDS) (see Damianou et al., NIPS 2011)
- (3) Manifold Relevance Determination (MRD) (see Damianou et al., ICML 2012)
Files for (1) and (2) have the prefix "vargplvm". Files for (3) have the prefix "svargplvm". The rest of the files are generic and used for all methods.
Dependencies graph:
- GPmat - The GPmat toolbox: https://github.com/SheffieldML/GPmat
- Netlab v.3.3: http://www1.aston.ac.uk/ncrg/
- Isomap.m: http://web.mit.edu/cocosci/isomap/code/Isomap.m
- L2_distance.m: http://web.mit.edu/cocosci/isomap/code/L2_distance.m
L2_distance ---- Isomap ---- GPmat ---- vargplvm / / Netlab ----------------
- Please check vargplvm/html/index.html for a short overview of this package.
- Check vargplvm/matlab/vargplvm_README.txt for Bayesian GP-LVM and VGPDS.
- Check vargplvm/matlab/VGPDStutorial.m for introductory demonstrations for VGPDS (see demosDynamics.m for more).
- Check vargplvm/matlab/svargplvm_README.txt for an overview of MRD
- Check vargplvm/matlab/MRDtutorial.m for introductory demonstrations for MRD.
The R code was initially implemented by Jie Hao [email protected] based on the MATLAB code. Further work on the code and documentation was performed by Nicolas Durrande [email protected]. Both were funded by the EU FP7-KBBE Project Ref 289434 "From Data to Models: New Bioinformatics Methods and Tools for Data-Driven Predictive Dynamic Modelling in Biotechnological Applications".