LibLinear-Prior is an extension to the LibLinear package, based on version 1.8. It extends the classic Linear SVM by incorporating individual weights on training examples, which is effectively some kind of soft label.

Currently, L2-regularized logistic regression (primal, '-s 0') and L2-regularized L2-loss support vector classification (primal, '-s 2') are supported.

For the L2-regularized L2-loss support vector classification (primal), the classic objective function is

Classic L2RL2L Formulation

The corresponding objective function with soft label enabled is

L2RL2L Formulation with Soft Label Enabled

Note the addition of a new variable ν. Its valid interval is [0, 1].


In the following toy example, observe how the separating hyperplane changes with the effect of confidence. In the first example, confidence for both positive and negative examples are set to 1. In the second, confidence for positive examples is set to 0.01.

The Software

The software is released under the BSD license.

Download The Package (r962)


Related Work

We used the software in our CVPR 2012 work on transfer learning.

Meng Wang, Wei Li and Xiaogang Wang. Transferring a Generic Pedestrian Detector Towards Specific Scenes. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition 2012. June 17 - 21, 2012, Providence, Rhode Island, USA.