Introduction
The LIBSVM data format is a plain text format for labelled data used in machine learning. It takes its name from LIBSVM, a library for support vector machines, and other programs read it too. It is known by that name rather than by a fixed file extension, so this page gives it none.
Structure
Each line holds one sample: a label followed by index:value pairs
separated by spaces, such as 1 1:5.10000 2:3.50000 3:1.40000 4:0.20000.
The format is sparse, so only values that are not zero need to be written. Indices are
given in ascending order and usually start at 1; index 0 is used for precomputed
kernels. Some readers also accept several labels separated by commas, a
qid field and comments after #.
Not described
This page is a first outline. The format is not yet described in full here.
Known, not yet covered
- Reference: the exact rules for labels and numbers, precomputed kernels and the differences between readers.
- Viewer: the site has no viewer for this format.
Links
Software
Developers
- readsparse – reads and writes sparse data in this form (R)
- checkdata.py – format checker from the LIBSVM tools (Python)
Reference
- LIBSVM data sets – collection of data stored in the format