1

I am trying to classify the reuters text using svm light but my train data does not follow the format

<'line> .=. <'target> <'feature>:<'value> <'feature>:<'value> ... <'feature>:<'value> # <'info>

it is of the form

<'line> .=. <'feature>:<'value> <'feature>:<'value> ... <'feature>:<'value> # <'info>

The target label is in a separate file. I know there's an option in SVM light that lets you specify a separate target label file but i cannot find it on the SVM light website because a get an arror message:

Reading examples into memory...Line must start with label or 0!!!

whenever i load my training data using

svm_learn example1/train.dat example1/model

any help ?

  • You could copy the labels from the second file into the first. This can be done with your favourite programming language or even in excel. – mbatchkarov Apr 23 '14 at 17:21
  • @mbatchkarov i thought of that but i thought it would be too much work. I know there's a simpler method but thanks, i will use excel if there is no other option – Rexfordnana Apr 23 '14 at 18:02

1 Answers1

1

Performing a rigorous research i realized that there is no syntax in SVM light that allows users to specify an external class label file for training data. The class labels must be part of the training data and it should follow the "target feature:value" format of SVM light