Reputation: 627
I often use the instance weights with Libsvm for classification problems. http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/#weights_for_data_instances
Does anyone know the details of the algorithm that is implemented when one uses instance weighing in libsvm? The standard SVM model learning algorithm assigns equal weights to all training instances, and thus to the error on the training instances. I believe that the algorithm that Libsvm uses would be different. Upon searching online, I do find some papers that do something similar. For example [1] but I need to confirm with someone who may be sure about this.
Thanks!
[1] Yang, Xulei, Qing Song, and Yue Wang. "A weighted support vector machine for data classification." International Journal of Pattern Recognition and Artificial Intelligence 21.05 (2007): 961-976.
Upvotes: 3
Views: 1298
Reputation: 66815
There is no "special algorithm", simply, in "equal weight" SVM you have a "C" weight
1/2 ||w||^2 + C SUM_i xi_i
which in case of samples weights s_i
simply becomes
1/2 ||w||^2 + C SUM_i s_i xi_i
that's all, it is exactly the same as having different cost cosntant C
for each sample
Upvotes: 5