# support vector machine values

Does anybody knows how to calculate w1 and w2 and b . I have the formula but I have no idea where those numbers come from . my question has solution so it is not a home work because the solution of question is included I only want to learn how the numbers come from .

• To make it more clear, replace w1 and w2 with a and b and replace x1 and x2 with x and y to get the line equation ax+by+c=0. So w1 and w2 are the coefficients of x1 and x2. – Paul Ogilvie Oct 9 '19 at 15:10

From your figure, assume the orange is $$x_1=mx_2+n$$, then substituting point $$(5,5)$$ or $$(9,1)$$ will give you: $$x_2=-x_1+10$$. Similarly, you can know that the blue line is $$x_2=-x_1+7$$. Then the dotted line in the middle (which is exactly the separating hyperplane) is \begin{align} &x_2=\frac12((-x_1+10)+(x_2=-x_1+7))=x_2=-x_1+8.5\\ \Longrightarrow\; &x_2+x_1-8.5=0\\ \Longrightarrow\; &w_1=1,w_2=1,b=-8.5. \end{align}