This is a Java version of the original LIBLINEAR C++ sources.
News
- 2010-02-19: intial port of liblinear with instance weight support. See Weights for data instances. Note: Version 1.51-weights is probably slower than 1.51.
- 2010-02-18: released version 1.51 that contains all changes of the C++ version.
- 2009-11-12: released version 1.5 that contains all changes of the C++ version.
- 2009-07-19: added getFeatureWeights() to the Model class.
- 2009-05-12: fixed a bug
in Linear.crossValidation().
Thanks to Zeno Gantner for reporting it.
Download
- liblinear-1.51-weights-with-deps.jar (includes blas dependency)
- liblinear-1.51-weights.jar (version 1.51 with instance weights support)
- liblinear-1.51-with-deps.jar
- liblinear-1.51.jar
- liblinear-1.5-with-deps.jar
- liblinear-1.5.jar
- liblinear-1.33-with-deps.jar
- liblinear-1.33.jar
Documentation
Usage
The usage is pretty similar to the usage of the C++ version. It can be used as Java library or standalone.
Example:
# java -cp liblinear-1.51-with-deps.jar liblinear.Train -v 5 rcv1_train.binary
time: 2612 ms
correct: 19653
Cross Validation Accuracy = 97.0902%
Source code & development
The source code is hosted and maintained on github:
http://github.com/bwaldvogel/liblinear-java/
Weka wrapper
There exists a Weka wrapper since version 3.6.
See the Javadoc for more Information.