1

I am trying to use SVM Light to learn a classifier for the OpenCV2.2 HOG Descriptor. I get a float vector output from the HOG descriptor.

After reading the SVMLight documentation, i still cannot understand what is the format of the input train and test data.

Example of a line from train.dat from the website:

1 6:0.0176472501759912 15:0.0151152682071138 26:0.0572866228831546 27:0.0128461400334668

Where,

The first char: 1, denote the positive class.    
The second and third char 6: <== I don't understand what does this means,    
The third variable denote the feature vector.

Would anyone please help? Thanks!

mehmet
  • 1,631
  • 16
  • 21
cyw
  • 163
  • 3
  • 11

1 Answers1

6

The second and third char 6: <== I don't understand what does this means, The third variable denote the feature vector.

The 6:XXXX means that the value of the 6th feature for this example is XXX

In the example you provide:

1 6:0.0176472501759912 15:0.0151152682071138 26:0.0572866228831546 27:0.0128461400334668

It means that the example has a class label of 1. The 6th feature value is 0.0176472501759912, the 15th feature value is 0.0151152682071138, etc.

Think of it as a "sparse encoding" of the feature vector for each example. Implicitly this means that values for features 1-5, 7-14, 16-25 is 0 for the example that you provided.

Steve Lianoglou
  • 7,183
  • 2
  • 25
  • 21