Skip to main content

Travis PyPi

LibSVM

Description

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 https://github.com/cjlin1/libsvm using the very convenient pip command

How to install

pip install libsvm

Example

  1. Download https://github.com/cjlin1/libsvm/blob/master/heart_scale 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)

Windows

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

Cygwin

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:

Maintainer

Metadata

Release files for libsvm 3.23.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for libsvm 3.23.0.2
File Size Uploaded
libsvm-3.23.0.2.tar.gz 168.3 kB Details

Release files / libsvm-3.23.0.2.tar.gz

Download URL libsvm-3.23.0.2.tar.gz
Size 168.3 kB
Tags Source
SHA-256 checksum
How to use checksums
effc4da4b32624b3b4b84dba00d80e2dba4c5b77cea1eb4f4a7243bf5f676c2c
BLAKE2b-256 checksum
How to use checksums
fa06979f9bc1139f53120bffb7c23d0e964d6a0e5d2af72b6e45279ff1e586a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.7

Release history Release notifications | RSS feed

This release

3.23.0.2 This release

1 release file

3.23.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page