Automatic and Efficient Parameter Selection in LIBLINEAR

After version 2.0 (and version 2.30 for regression), LIBLINEAR supports a new function to select parameters. It automatically generates a grid of parameters and outputs the best one according to the cross-validation accuracy. The warm-start technique is applied to speed up the parameter-selection procedure. Currently only primal classification/regression solvers are supported (-s 0, -s 2, or -s 11). Technical details are in the following papers.

B.-Y. Chu, C.-H. Ho, C.-H. Tsai, C.-Y. Lin, and C.-J. Lin. Warm Start for Parameter Selection of Linear Classifiers. ACM KDD 2015 (supplementary materials including the derivation not shown in the paper and more results of experiments).

J.-Y. Hsia and C.-J. Lin. Parameter Selection for Linear Support Vector Regression. Technical report, 2019. (supplementary materials)

If you successfully used this code for your applications, please let us know. We are interested in how it's being used.


How to Run Parameter Selection in LIBLINEAR

It is very simple by using the new option -C. Examples:

Find parameters by five-fold cross validation and a logistic regression solver.

> train -s 0 -C -v 5 heart_scale
Find parameters by ten-fold cross validation and a linear L2-loss SVR solver.
> train -s 11 -C -v 10 heart_scale

Please contact Chih-Jen Lin for any question.