This link should help: http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#/Q3:_Data_preparation
It's mentioned that the data is stored in a sparse array/matrix form. Essentially, it means only the non-zero data are stored, and any missing data is taken as holding value zero. For your questions:
a) Index merely serves as a way to distinguish between the features/parameters. In terms of a hyperspace, it's merely designating each component: Eg: 3-D ( 3 features) indices 1,2,3 would correspond to the x,y,z coordinates.
b) The correspondence is merely mathematical, when constructing the hyper-plane, these serve as coordinates.
c) If you skip one in between, it should be assigned a default value of zero.
In short, +1 1:0.7 2:1 3:1 translates to:
Assign to class +1, the point (0.7,1,1).
Answer from Govind Gopakumar on Stack ExchangeThis link should help: http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#/Q3:_Data_preparation
It's mentioned that the data is stored in a sparse array/matrix form. Essentially, it means only the non-zero data are stored, and any missing data is taken as holding value zero. For your questions:
a) Index merely serves as a way to distinguish between the features/parameters. In terms of a hyperspace, it's merely designating each component: Eg: 3-D ( 3 features) indices 1,2,3 would correspond to the x,y,z coordinates.
b) The correspondence is merely mathematical, when constructing the hyper-plane, these serve as coordinates.
c) If you skip one in between, it should be assigned a default value of zero.
In short, +1 1:0.7 2:1 3:1 translates to:
Assign to class +1, the point (0.7,1,1).
Just small and fast guide:
LibSVM format means that your document needs to be pre-processed already. You need to know how many classification classes will be used (most likely 2) and feature space.
Classification class is something like true/false; 0,1,... Here you need to transform it into integers (e.g. 0,1).
Feature space is a space for your multidimensional data. Each feauture (vector) should have its own ID (index) and its value. E.g. 1:23.2 means that feature/dimension 1 has value 23.2
<label> <index1>:<value1> <index2>:<value2> ... <indexN>:<valueN>
...
This link should help: http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#/Q3:_Data_preparation
It's mentioned that the data is stored in a sparse array/matrix form. Essentially, it means only the non-zero data are stored, and any missing data is taken as holding value zero. For your questions:
a) Index merely serves as a way to distinguish between the features/parameters. In terms of a hyperspace, it's merely designating each component: Eg: 3-D ( 3 features) indices 1,2,3 would correspond to the x,y,z coordinates.
b) The correspondence is merely mathematical, when constructing the hyper-plane, these serve as coordinates.
c) If you skip one in between, it should be assigned a default value of zero.
In short, +1 1:0.7 2:1 3:1 translates to:
Assign to class +1, the point (0.7,1,1).
Answer from Govind Gopakumar on Stack ExchangeVideos
» pip install libsvm-official