From: Ibraheem on 10 Mar 2010 21:31 Hi guys, So far I understand that SVM try to find the parameters (w and b) of the hyperplane described by the equation y(i)=w*x(i)+b I wonder where svmtrain function save the w vector. I can not find it in the SVMStruct. Regards,
From: Bruno Luong on 11 Mar 2010 02:30 "Ibraheem " <ibr_ex(a)hotmail.com> wrote in message <hn9kl9$5nn$1(a)fred.mathworks.com>... > Hi guys, > > So far I understand that SVM try to find the parameters (w and b) of the hyperplane described by the equation y(i)=w*x(i)+b > I wonder where svmtrain function save the w vector. I can not find it in the SVMStruct. svmtrain does no save w and b, because w can only be explicitly computed from *linear* kernel. SVM train stores support vectors and the dual variables times the class binary presentation (+/-1). Everything can be computed from kernel and support vectors. Bruno
From: Ibraheem on 12 Mar 2010 01:13 Thank you for your concern and quick reply, Can you, please, tell me how to compute w from *linear* kernel? Regards,
From: Bruno Luong on 12 Mar 2010 06:09 "Ibraheem " <ibr_ex(a)hotmail.com> wrote in message <hncm1e$c05$1(a)fred.mathworks.com>... > Thank you for your concern and quick reply, > Can you, please, tell me how to compute w from *linear* kernel? > Regards, http://www.mathworks.com/matlabcentral/newsreader/view_thread/260308#679215 replace "w'*x" by kernel operator applied on w and x. Bruno
From: Ibraheem on 15 Mar 2010 22:33
Hi Bruno, >http://www.mathworks.com/matlabcentral/newsreader/view_thread/260308#679215 > replace "w'*x" by kernel operator applied on w and x. Thank you again for your concern and quick reply. I have read your post but I can not understand the notation. Do you mean : W = sum( lambda*Y*X); b = -1/2 ( mean (SV(SV(2)<0)) W'*X + mean(SV(SV(2)>0)) W'*X); I don't understand two things: 1. Does the mean for all matrix or for the second column only. 2. What is the dual variable ? Is it alpha ? Sorry for bothering and regards, |