quadprog function for non-separable data-set

I want to implement svm for two sets of non-separable cases using svm primal form(without using built-in functions). In the minimize quadratic function, I have 1/2 norm(w)^2 + C*summation over all feature vectors(epsilon). If I use quaprog function, I am not sure if I need to have the vector 'f' since I have only one quadratic term in w. But without using 'f' the minimizing expression is not complete.
Could someone please help on how to build the matrices of 'quadprog' function for non-separable svm primal case?
Thanks so much

답변 (1개)

Matt J
Matt J 2013년 3월 2일
편집: Matt J 2013년 3월 2일

0 개 추천

Just set f=zeros(size(w)), if there is no linear term in your objective function.

댓글 수: 5

rini
rini 2013년 3월 2일
Thak you so much for the answer, but if I set 'f' to be zero doesn't the problem becomes similar to the linearly separable case? For non-separable cases do we totally neglect this factor?
Thanks.
Matt J
Matt J 2013년 3월 2일
편집: Matt J 2013년 3월 2일
I have no background in SVM, but based on wiki:SVM Primal Form, you indeed have f=0 and you also have non-trivial linear constraints that you have not mentioned. The constraints render the problem nonseparable, as long as they're not simple bound constraints.
Matt J
Matt J 2013년 3월 2일
편집: Matt J 2013년 3월 2일
If your constraints are simple bound constraints, the problem will be separable purely by virtue of the quadratic term being norm(w)^2/2 regardless of whether f=0 or not. The linear term is always separable.
rini
rini 2013년 3월 11일
thank you so much
Matt J
Matt J 2013년 3월 11일
Accept-clicking my answer is all the thanks I need ;)

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Quadratic Programming and Cone Programming에 대해 자세히 알아보기

질문:

2013년 3월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by