
XGP: relational classification with Gaussian processes and mixed graph models
-----------------------------------------------------------------------------

* INFORMATION:

This software implements the method described in the following paper:

Silva, R.; Chu, W. and Ghahramani, Z. (2007). ``Hidden common cause relations
in relational learning''. Neural Information Processing Systems, NIPS 20.

The code is written run in Octave 2.9.16 or superior, and MATLAB 7.0 or 
superior.

Please report any problems and suggestions to silva@statslab.cam.ac.uk.

* PRELIMINARIES:

In order to run this software, you will need the following libraries:

- the stixbox library of statistical functions 
  http://www.maths.lth.se/matstat/stixbox/

- Carl Rasmussen's GPML Gaussian processes code:
  http://www.gaussianprocess.org/gpml/code/matlab/doc/
  
  Optional. Only needed in order to run the 
  WebKB demo that runs comparisons between regular GP and XGP.

- Kevin Murphy's ``graph theory'' toolbox for MATLAB:
  http://www.cs.ubc.ca/~murphyk/Software/index.html
  
  This is only needed if one wants to build relational kernels using
  the methods described in the Silva et al. paper.

- The RCM Reverse Cuthill McKee Ordering MATLAB package:
  http://people.scs.fsu.edu/~burkardt/f_src/rcm/rcm.html
  
  Again, this is only needed if one wants to build relational kernels using
  the methods described in the Silva et al. paper.
  
* USING XGP

The best way of understanding the XGP software is through the WebKB demo. The
XGP is very close to standard GPs. Essentially, one only needs to provide one
extra kernel matrix that encodes relational dependencies. In the WebKB demo,
this matrix is rhoU. Matrix K is a standard GP kernel matrix. The actual xgp
function takes the sum of kernels, rhoU + K = R. Besides that it only needs the
vector of labels, y. However, unlike standard GPs, the learning is
transductive: all training and test points have to be passed to xgp.  The
encoding is as follows:

  -y(i) == -1; % this means the label is of the ``negative'' class
  -y(i) ==  0; % this means the label is unobserved (i.e., a test point)
  -y(i) ==  1; % this means the label is of the ``positive'' class

A vector with the error inverse variances (precisions) is also needed. In the 
paper, as in the WebKB demo, this is suggested to be chosen such that the total 
error variance (after adding rhoU) is of 1.  

AUC curves are calculated using roc.m.

See the directory ./demo for the WebKB demo.

See the directory ./preprocess for code on suggested ways of deriving kernel
matrices for relational data given an adjacency matrix. This is also explained
in the paper.

* ACKNOWLEDGEMENTS

Part of this work was funded by the Gatsby Charitable Foundation.

(c) 2007 Ricardo Silva and Wei Chu
    Version 1.0 - Cambridge, UK November 2007