Encoding for svm model

$ sentiment negative, positive, positive, negative, negative, negative, po...
Factor w/ 2 levels "negative","positive": 1 2 2 1 1 1 2 1 2 2 ...

Got a factor sentiment with levels positive and negative. However, instead of (1,2) as values, i want to encode this with (-1,1) values for svm. Am stuck on this... pls help

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.