This directory includes sources used to generate tables in the
following paper:

Yin-Wen Chang, Cho-Jui Hsieh, Kai-Wei Chang, Michael Ringgaard, and
Chih-Jen Lin. Low-degree Polynomial Mappings of Data for SVM, 2009.

Use this directory only if you are interested in redoing our
experiments. To apply the proposed method to your applications, all
you need is a LIBLINEAR extension. Check "fast training/testing of
degree-2 polynomial mappings of data" at

http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/

Note that experimental results may be slightly different from ours due
to the randomness, the CPU speed, and the load of your computer.

Please cite the above article if you find this tool useful. Please
also read the COPYRIGHT before using this tool.

Prepare Data Sets for Experiments
=================================

Type

% ./gen_data.py

The script will download six data sets (a9a, real-sim, ijcnn, mnist, 
covtype, and webspam) from LIBSVM Data page. It will also extract the classes
3 and 8 from mnist to form a binary classification problem mnist38.
For real-sim, covtype, and webspam, the script does a 80/20 split for 
the training and testing sets. The *.train and *.test files are stored
in the 'data' directory. Due to randomness, the training and testing 
split may be different each time.

Note that you need wget and bunzip2, which are called by gen_data.py

Installation for Experiments
============================

The implementations are modified from the LIBLINEAR and LIBSVM packages,
which are in the 'liblinear' and 'libsvm' directory respectively.

Type 

% make clean all;

to build the codes

Generate Tables in the Paper
============================

Type 

% python ./table[n].py 

to generate table n where n is 3, 4, 5, 6 or 7.

The tables are generated according to the results in the log files.
The log of different settings are stored in the 'log' directory.
If a log file doesn't exist, the script will conduct the experiment
to generate the log. The resulting table will be output to the standard 
output as a latex table format.

Table 3 compares the L2 cache miss rate and the training time of 
storing phi(x_i) and calculating phi(x_i). You need OProfile and
root access to run it, since the L2 cache miss rate are obtained by 
OProfile.

Note that we report NA if programs do not terminiate after 300,000 seconds.
We also omit websapm in Table 4 as it may cost more than 16 GByte memory.
