how to find lagrange multipliers value in SVM
8 views (last 30 days)
Show older comments
matlab code:
data=[1 1;2 2;2 3;1 4];
labels=['x';'x';'y';'y'];
if (1)
svmStruct = svmtrain(data, labels, 'showplot',true);
else
svmStruct = svmtrain(data, labels, 'kernel_function', 'linear','showplot',true);
end
return;
my problem:
in svmtrain.m file how to find the value of "alpha" mathematically.
- i have some equations on lagrange multipliers(alpha) like...
-2a1-4a2+5a3+5a4-c+1=0
-4a1-8a2+10a3+10a4-c+1=0
5a1+10a2-13a3-14a4+c+1=0
5a1+10a2-14a3-17a4+c+1=0
a1+a2-a3-a4=0
where a1,a2,a3,a4 are lagrange multipliers and c is a constant
i tried in matlab to find solution for these equation but the matrix become nearly singular matrix.
these equations are inconsist but there any way to find these a1,a2,a3,a4,c values...
1 Comment
Walter Roberson
on 3 Feb 2012
Reference: http://www.mathworks.com/matlabcentral/answers/27679-how-to-find-lagrange-multipliers-value-in-svm
Answers (1)
Walter Roberson
on 3 Feb 2012
No. In your earlier question on this subject, Anton proved that your equations are inconsistent. There is no solution for inconsistent equations. Every possible set of values will produce an inconsistency.
This is not an underdetermined system where there are multiple solutions and one needs to be found: this is a system whose equations cannot all be true.
Please go back and re-check your lagrange multiplier equations that you are solving.
0 Comments
See Also
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!