Institute of Mathematics and University of Stuttgart

liquidSVM: A Fast and Versatile SVM Package


February 23rd 2017: version 1.2

June 8th 2016: version 1.1.

Changes include:

General Information

Support vector machines (SVMs) and related kernel-based learning algorithms are a well-known class of machine learning algorithms, for non-parametric classification and regression. liquidSVM is an implementation of SVMs whose key features are:

For questions and comments just contact us via mail. There you also can ask to be registerd to our mailing list.

liquidSVM is licensed under AGPL 3.0. In case you need another license, please contact me.

Command Line interface

Installation instructions for the command line versions.

Terminal version for Linux/OS X liquidSVM.tar.gz
Terminal version for Windows (64bit) avx2:
Previous versions v1.1 (June 2016), v1.0 (January 2016)

On Linux and Mac on the terminal liquidSVM can be used in the following way:

tar xzf liquidSVM.tar.gz
cd liquidSVM
make all
scripts/ banana-mc 1 2


Read the demo vignette for a tutorial on installing liquidSVM-package and how to use it and the documentation vignette for more advanced installation options and usage.

An easy usage is:

banana <- liquidData('banana-mc')
model <- mcSVM( Y~. , banana$train, display=1, threads=2)
result <- test(model, banana$test)


Read the demo notebook for a tutorial on installing liquidSVM-package and how to use it and the homepage for more advanced installation options and usage.

To install use:

pip install --user liquidSVM

and then in Python you can use it e.g. like:

from liquidSVM import *
banana = LiquidData('banana-mc')
model = mcSVM(banana.train, display=1, threads=2)
result, err = model.test(banana.test)

MATLAB / Octave

The MATLAB bindings are currently getting a better interface, and this is a preview version.

It does currently not work on Windows.

For installation download the Toolbox liquidSVM.mltbx and install it in MATLAB by double clicking it. To compile and add paths issue:

makeliquidSVM native

Then you can use it like:

banana = liquidData('banana-mc');
model = svm_mc(banana.train, 'DISPLAY', 1, 'THREADS', 2);
[result, err] = model.test(banana.test);

Most of the code also works in if you use


The main homepage is here. For installation download and unzip it. The classes are all in package de.uni_stuttgart.isa.liquidsvm and an easy example is:

LiquidData banana = new LiquidData("banana-mc");
SVM model = new MC(banana.train, new Config().display(1).threads(2));
ResultAndErrors result = model.test(banana.test);

If this is implemented in the file this can be compiled and run using

# if you want to compile the JNI-native library:
make lib
# compile your Java-Code
javac -classpath liquidSVM.jar
# and run it
java -Djava.library.path=. -cp .:liquidSVM.jar Example


This is a preview version, see Spark for more details. Download and unzip it. Assume you have Spark installed in $SPARK_HOME you can issue:

make lib
$SPARK_HOME/bin/spark-submit \
  --class de.uni_stuttgart.isa.liquidsvm.spark.App \
  liquidSVM-spark.jar banana-mc

If you have configured Spark to be used on a cluster with Hadoop use:

hdfs dfs -put data/covtype-full.train.csv data/covtype-full.test.csv .
make lib
$SPARK_HOME/bin/spark-submit --files ../ \
  --conf spark.executor.extraLibraryPath=. \
  --conf spark.driver.extraLibraryPath=. \
  --class de.uni_stuttgart.isa.liquidsvm.spark.App \
  --num-executors 14 liquidSVM-spark.jar covtype-full

Extra Datasets for the Demo

covertype data set with 35.090 training and 34.910 test samples

covertype data set with 522.909 training and 58.103 test samples

Both datasets were compiled from LIBSVM's version of the covertype dataset, which in turn was taken from the UCI repository and preprocessed as in [RC02a]. Copyright for this dataset is by Jock A. Blackard and Colorado State University.


If you use liquidSVM, please cite it as:

I. Steinwart and P. Thomann. liquidSVM: A fast and versatile SVM package. ArXiv e-prints 1702.06899, February 2017.