Jason Rennie's Matlab Code

An Brief Introduction: How to run Fast MMMF

Theory & experiments: Fast Maximum Margin Matrix Factorization for Collaborative Prediction.

Examples of how to use this code for Fast MMMF: weak.m, strong.m. Here's the data to run weak.m: marlin.mat.

For the MMMF obj/grad functions, conjgrad returns a vector of all of the parameters, U, V and theta. Here's how to extract:

U = reshape(v(1:n*p),n,p);
V = reshape(v(n*p+1:n*p+m*p),m,p);
theta = reshape(v(n*p+m*p+1:n*p+m*p+n*(l-1)),n,l-1);
Here's how to predict:
X = U*V';
Y = m3fSoftmax(X,theta);
Note that p is the number of columns of U and V and hence the maximum rank of X. I.e. if p is smaller than the smaller dimension of X, then it constrains the rank of X. Ideally, p is set to min(n,m), but, in practice, smaller values are used for efficiency. A value of p=100 was used for my thesis experiments.

The Code

AFS

If you have AFS, you can simply run the following line from within matlab (or add it to your startup.m file):
addpath '/afs/csail.mit.edu/u/j/jrennie/public_html/matlab'

Other People's Code

Other Code



Last modified: Thu Feb 21 08:58:37 2008