Using libsvm to classify C # text

I use libsvm to predict moods. I wanted to know in what format the input should be present assuming that I use the number of words.

     [label] [index]:[value] [index]:[value]

This format is required from libsvm. Does this mean that I have only two labels (one for positive and one for negative), each word under this label will be an index, and the value will be the frequency of each word?

Does this also mean that I need to keep the display of the word in the index for use in my test case?

0
source share
2 answers

LIBSVM "" , . ,
5 0 2 0
​​ 1: 5 3: 2
.

. +1 -1 . , . (, 1,2,3,4,5,...)

+2

, , libsvm. heart_scale. ... ...

0

All Articles