<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/276146</link>
    <title>MATLAB Central Newsreader - SVM simple question</title>
    <description>Feed for thread: SVM simple question</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2010 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 11 Mar 2010 02:31:05 -0500</pubDate>
      <title>SVM simple question</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/276146#725363</link>
      <author>Ibraheem </author>
      <description>Hi guys,&lt;br&gt;
&lt;br&gt;
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&lt;br&gt;
I wonder where svmtrain function save the w vector. I can not find it in the SVMStruct.&lt;br&gt;
&lt;br&gt;
Regards,</description>
    </item>
    <item>
      <pubDate>Thu, 11 Mar 2010 07:30:26 -0500</pubDate>
      <title>Re: SVM simple question</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/276146#725416</link>
      <author>Bruno Luong</author>
      <description>&quot;Ibraheem &quot; &amp;lt;ibr_ex@hotmail.com&amp;gt; wrote in message &amp;lt;hn9kl9$5nn$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi guys,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 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&lt;br&gt;
&amp;gt; I wonder where svmtrain function save the w vector. I can not find it in the SVMStruct.&lt;br&gt;
&lt;br&gt;
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.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Fri, 12 Mar 2010 06:13:02 -0500</pubDate>
      <title>Re: SVM simple question</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/276146#725719</link>
      <author>Ibraheem </author>
      <description>Thank you for your concern and quick reply,&lt;br&gt;
Can you, please, tell me how to compute w from *linear* kernel?&lt;br&gt;
Regards,</description>
    </item>
    <item>
      <pubDate>Fri, 12 Mar 2010 11:09:07 -0500</pubDate>
      <title>Re: SVM simple question</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/276146#725775</link>
      <author>Bruno Luong</author>
      <description>&quot;Ibraheem &quot; &amp;lt;ibr_ex@hotmail.com&amp;gt; wrote in message &amp;lt;hncm1e$c05$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Thank you for your concern and quick reply,&lt;br&gt;
&amp;gt; Can you, please, tell me how to compute w from *linear* kernel?&lt;br&gt;
&amp;gt; Regards,&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/newsreader/view_thread/260308#679215&quot;&gt;http://www.mathworks.com/matlabcentral/newsreader/view_thread/260308#679215&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
replace &quot;w'*x&quot; by kernel operator applied on w and x.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Tue, 16 Mar 2010 02:33:08 -0400</pubDate>
      <title>Re: SVM simple question</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/276146#726683</link>
      <author>Ibraheem </author>
      <description>Hi Bruno,&lt;br&gt;
&amp;gt;&lt;a href=&quot;http://www.mathworks.com/matlabcentral/newsreader/view_thread/260308#679215&quot;&gt;http://www.mathworks.com/matlabcentral/newsreader/view_thread/260308#679215&lt;/a&gt;&lt;br&gt;
&amp;gt; replace &quot;w'*x&quot; by kernel operator applied on w and x.&lt;br&gt;
Thank you again for your concern and quick reply.&lt;br&gt;
I have read your post but I can not understand the notation.&lt;br&gt;
Do you mean :&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;W = sum( lambda*Y*X);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b = -1/2 ( mean (SV(SV(2)&amp;lt;0)) W'*X + mean(SV(SV(2)&amp;gt;0)) W'*X);&lt;br&gt;
I don't understand two things:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;1. Does the mean for all matrix or for the second column only.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;2. What is the dual variable ? Is it alpha ?&lt;br&gt;
Sorry for bothering and regards,</description>
    </item>
    <item>
      <pubDate>Tue, 16 Mar 2010 07:52:03 -0400</pubDate>
      <title>Re: SVM simple question</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/276146#726729</link>
      <author>Bruno Luong</author>
      <description>&quot;Ibraheem &quot; &amp;lt;ibr_ex@hotmail.com&amp;gt; wrote in message &amp;lt;hnmql4$osg$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi Bruno,&lt;br&gt;
&amp;gt; &amp;gt;&lt;a href=&quot;http://www.mathworks.com/matlabcentral/newsreader/view_thread/260308#679215&quot;&gt;http://www.mathworks.com/matlabcentral/newsreader/view_thread/260308#679215&lt;/a&gt;&lt;br&gt;
&amp;gt; &amp;gt; replace &quot;w'*x&quot; by kernel operator applied on w and x.&lt;br&gt;
&amp;gt; Thank you again for your concern and quick reply.&lt;br&gt;
&amp;gt; I have read your post but I can not understand the notation.&lt;br&gt;
&amp;gt; Do you mean :&lt;br&gt;
&amp;gt;     W = sum( lambda*Y*X);&lt;br&gt;
&amp;gt;     b = -1/2 ( mean (SV(SV(2)&amp;lt;0)) W'*X + mean(SV(SV(2)&amp;gt;0)) W'*X);&lt;br&gt;
&lt;br&gt;
&amp;gt; I don't understand two things:&lt;br&gt;
&amp;gt;    1. Does the mean for all matrix or for the second column only.&lt;br&gt;
&lt;br&gt;
For a data #i, Yi is class (or group +/--1) of the data Xi (a vector observation in R^n, its is one row of the training data your pass to svmclassify), and lambda_i is the dual variable (scalar) returned. Multiply these three term and add them together (sum on i), you get a vector W. Next compute b which is a scalar. &lt;br&gt;
&lt;br&gt;
&amp;gt;    2. What is the dual variable ? Is it alpha ?&lt;br&gt;
&amp;gt; Sorry for bothering and regards,&lt;br&gt;
&lt;br&gt;
Matlab classify returns in Alpha the product (Yi*lambdai_i) after training.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Tue, 16 Mar 2010 23:34:05 -0400</pubDate>
      <title>Re: SVM simple question</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/276146#726984</link>
      <author>Ibraheem </author>
      <description>I think I get the idea now, thank you very much. </description>
    </item>
    <item>
      <pubDate>Thu, 03 Jun 2010 14:13:03 -0400</pubDate>
      <title>Re: SVM simple question</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/276146#751331</link>
      <author>Daniel </author>
      <description>&quot;Bruno Luong&quot; &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;hnndb3$a6q$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Ibraheem &quot; &amp;lt;ibr_ex@hotmail.com&amp;gt; wrote in message &amp;lt;hnmql4$osg$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi Bruno,&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;a href=&quot;http://www.mathworks.com/matlabcentral/newsreader/view_thread/260308#679215&quot;&gt;http://www.mathworks.com/matlabcentral/newsreader/view_thread/260308#679215&lt;/a&gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; replace &quot;w'*x&quot; by kernel operator applied on w and x.&lt;br&gt;
&amp;gt; &amp;gt; Thank you again for your concern and quick reply.&lt;br&gt;
&amp;gt; &amp;gt; I have read your post but I can not understand the notation.&lt;br&gt;
&amp;gt; &amp;gt; Do you mean :&lt;br&gt;
&amp;gt; &amp;gt;     W = sum( lambda*Y*X);&lt;br&gt;
&amp;gt; &amp;gt;     b = -1/2 ( mean (SV(SV(2)&amp;lt;0)) W'*X + mean(SV(SV(2)&amp;gt;0)) W'*X);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I don't understand two things:&lt;br&gt;
&amp;gt; &amp;gt;    1. Does the mean for all matrix or for the second column only.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; For a data #i, Yi is class (or group +/--1) of the data Xi (a vector observation in R^n, its is one row of the training data your pass to svmclassify), and lambda_i is the dual variable (scalar) returned. Multiply these three term and add them together (sum on i), you get a vector W. Next compute b which is a scalar. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;    2. What is the dual variable ? Is it alpha ?&lt;br&gt;
&amp;gt; &amp;gt; Sorry for bothering and regards,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Matlab classify returns in Alpha the product (Yi*lambdai_i) after training.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Bruno&lt;br&gt;
&lt;br&gt;
where i can find lambda? is alpha=Yi*lambda?&lt;br&gt;
and i'm doing some project using svm and my case is non-linear separable case, in non-linear there is variable C, how can i adjust variable C in svmtrain?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
regards</description>
    </item>
  </channel>
</rss>
