How do I formulate soft margin SVM in primal form for quadprog function?

11 ビュー (過去 30 日間)
Tushar Aggarwal
Tushar Aggarwal 2015 年 11 月 1 日
回答済み: Nitin Khola 2015 年 11 月 3 日
I am not able to formulate the matrices needed for quadprog function to solve soft margin SVM.

回答 (1 件)

Nitin Khola
Nitin Khola 2015 年 11 月 3 日
My answer is based on the following Wikipedia article and documentation links. Refer to these links for notation related questions: https://en.wikipedia.org/wiki/Support_vector_machine#Soft_margin. http://www.mathworks.com/help/optim/ug/quadprog.html
For the objective function, you just need need the H to be [1 0 0; 0 0 0; 0 0 0] assuming each of w,eta, and b are scalar quantities. In order to generalize this idea for vector w,eta, and b. You need H to be a multidimensional array so that the dimensions match when you are trying to do [w' eta' b']*H*[w eta b]. Another quantity required is "f" and it should be of the form [0; c; 0].
The constraints are linear as well. You can follow a similar method for setting up the constraints. Hope it helps!

カテゴリ

Help Center および File ExchangeQuadratic Programming and Cone Programming についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by