This is the experiment code for the paper "Large-scale Kernel RankSVM"
This code will generate the experimental result figures in the paper.
However, the result may be slightly different due to the CPU frequency
and the work load of your computer.

This code has been tested under a 64-bit Linux environment.

To run this experiment code, there are some requirement:

System Requirement
==================
This experiment should be running under 64-bit Linux environments
The following command are required:
- UNIX utilities (cp, mkdir)
- bash
- gcc 4.4.3 or newer version with openMP support
- Python 2.6 or Python 2.7
- make
- patch
- tar
- unzip
- matlab


Package Requirment
==================
The followings are the packages required. 
Each of them implements one of the compared methods in the paper.
You have to download the archived source code of each
package and put it in the directory "./packages".

1. svm-light 6.02 (svm_light.tar.gz) : You can download it from 
http://download.joachims.org/svm_light/current/svm_light.tar.gz

2. svm-rank 1.00 (svm_rank.tar.gz) : You can download it from 
http://download.joachims.org/svm_rank/current/svm_rank.tar.gz

3. rv-svm (rvsvm.zip): You can download it from 
https://sites.google.com/site/postechdm/research/implementation/rv-svm/rvsvm.zip?attredirects=0



Library Requirement & Setting
=============================
Some methods compared in the paper require the following libraries:
- IBM CPLEX Optimizer: 
You can find the information about CPLEX at 

http://www-01.ibm.com/software/commerce/optimization/cplex-optimizer

Note that full version of CPLEX is required.
To make packages compiled with CPLEX,
You have to assign the absolute path of CPLEX root directory to the variable
CPLEX_ROOT in the Makefile.


- Intel Math Kernel Library (MKL) (Optional): 
This is an optimizing BLAS implementation. 
The implementation of our method can work with this library.
You can find information about this library at

http://software.intel.com/en-us/intel-mkl

Note that you must use this library on a machine with Intel processors.
If you want to use this library,
you have to assign the absolute path of root directory of MKL
to MKL_ROOT in the Makefile.
Besides, 
you need to add the following paths to the environment variable LD_LIBRARY_PATH,

MKL_ROOT/mkl/lib/intel64
MKL_ROOT/compiler/lib/intel64

where MKL_ROOT is the absolute path of the root directory of MKL



Experiment Data
===============
MQ2007, MQ2008, MQ2007-list from LETOR are used in this experiment.
You can find the download link at 

http://research.microsoft.com/en-us/um/beijing/projects/letor/letor4dataset.aspx

For each data set, there are five folds of data,
and you have to put the "train.txt" and "test.txt" of the first fold into
directory ./data/DATASET/.
Take MQ2008 for example, you should put "train.txt" 
and "test.txt" of the first fold of MQ2008 into directory ./data/MQ2008/



Run the Experiment
==================
To run the experiment code without MKL, type
% make all
Otherwise, type
% make all USE_MKL=1

The figures of experimental result will be generated automatically and placed at
the directory "./figures"

Note that if you interrupt the experiment code before it finishs,
you have to type "make clean" before you type "make all" again.

