This directory includes sources to perform experiments on logistic 
regression for document classification. These sources generate 
Figure 3 in the following paper:

Fang-Lan Huang, Cho-Jui Hsieh, Kai-Wei Chang, and Chih-Jen Lin.
Iterative Scaling and Coordinate Descent Methods for
Maximum Entropy Models, 2009.

The code is extended from LIBLINEAR 
(http://www.csie.ntu.edu.tw/~cjlin/liblinear).
Please read the COPYRIGHT before using this tool.

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

Type

% python ./gen_data.py

The script will download three data sets (real-sim, news20.binary,
rcv1_test.binary) from LIBSVM Data page, do a 80/20 split for
training and testing, and then store *.train and *.test in the 'data'
directory. Due to the 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
============================

Except lbfgs, other solvers are implemented in the 'liblinear' directory.
The implmentation of lbfgs is in the 'lbfgs' direcotry.

Type

% make clean all;

to build the codes.

Compare Logistic Regression Solvers: SCGIS, CD, LBFGS, TRON
===========================================================

Type

% python ./compare_cdlr.py

The results are stored in the 'log' directory.
Use the values in columns 'time', 'f', 'g' and 'accuracy' to generate
Figures 3 and 4.

Note that Matlab is needed for running LBFGS code.
