SVMlight Learning File Format

From GM-RKB
Jump to navigation Jump to search

See: SVMlight Learning File Format, SVMlight System, Learning File Format, File Format.



References

  • http://svmlight.joachims.org/
    • The input file example_file contains the training examples. The first lines may contain comments and are ignored if they start with #. Each of the following lines represents one training example and is of the following format:
       <line> .=. <target> <feature>:<value> <feature>:<value> ... <feature>:<value> # <info>
       <target> .=. +1 | -1 | 0 | <float> 
       <feature> .=. <integer> | "qid"
       <value> .=. <float>
       <info> .=. <string>

    • The target value and each of the feature/value pairs are separated by a space character. Feature/value pairs MUST be ordered by increasing feature number. Features with value zero can be skipped. The string <info> can be used to pass additional information to the kernel (e.g. non feature vector data). Check the FAQ for more details on how to implement your own kernel.
    • In classification mode, the target value denotes the class of the example. +1 as the target value marks a positive example, -1 a negative example respectively. So, for example, the line
       -1 1:0.43 3:0.12 9284:0.2 # abcdef