1

Cost in e1071's SVM doesn't seems same as svmlight's Cost. The manual of e1071 library states the following definition for its cost parameter:

cost of constraints violation (default: 1)β€”it is the β€˜C’-constant of the regular-
ization term in the Lagrange formulation

This is basically the allowance of miss-classification. There is one weight as provided by svmlight, described in its manual as:

Cost: cost-factor, by which training errors on
      positive examples outweight errors on negative
      examples (default 1)

This cost is basically to allow balancing in case the train data doesn't has equal number of positive and negative data points. Is there anything similar in e1071's SVM implementation?

Bit Manipulator
  • 248
  • 1
  • 2
  • 17

1 Answers1

0

You probably want to look at the argument: class.weights (which is explained on the help page).

Best David

  • Hey, Thanks David! I guess you are the same David Meyer who is author and maintainer of e1071's. I really wonder who (and why) had downvoted your answer - which is exactly the thing I was asking for. I am upvoting too so that the previous downvote gets nullified. Thanks again! and Welcome to Stackoverflow. – Bit Manipulator Jan 18 '15 at 07:15