Skip to main content

Pre-built LibSVM packages for Python.

Project description

Travis PyPi



Pre-built LibSVM packages for Python.

What is LibSVM?

Crated by Chih-Chung Chang and Chih-Jen Lin, LIBSVM is an integrated software for support vector classification, (C-SVC, nu-SVC), regression (epsilon-SVR, nu-SVR) and distribution estimation (one-class SVM). It supports multi-class classification.

Purpose of this package

The idea behind this package is to use the same code as in using the very convenient pip command

How to install

pip install libsvm


  1. Download file.
  2. Run the following commands
>>> from libsvm.svmutil import *
>>> y, x = svm_read_problem('path/to/heart_scale')
>>> m = svm_train(y[:200], x[:200], '-c 4')
optimization finished, #iter = 257
nu = 0.351161
obj = -225.628984, rho = 0.636110
nSV = 91, nBSV = 49
Total nSV = 91
>>> p_label, p_acc, p_val = svm_predict(y[200:], x[200:], m)
Accuracy = 84.2857% (59/70) (classification)


The package contains a pre-built Windows binary that is only compatible with 64 bits architecture; therefore, 32 bits architecture is not compatible.


In case that you want to install this package using Cygwin, you have to make sure that the following packages are installed:

  1. gcc-g++ >= 7.0.0
  2. python38
  3. python38-devel
  4. python38-pip

Some good tutorials to install Cygwin packages are the following:


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for libsvm, version
Filename, size File type Python version Upload date Hashes
Filename, size libsvm- (170.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page