0
$\begingroup$

Reading about support vector machines. The equation of separating hyperplane is given as:

$w^Tx + b = 0$

Now, I am at a loss. Argument $w^Tx $ says (if equal to 0) that cosine of point $x$ and normal vector $w$ is 0, but what if the point is not in the plane going through origin? Then the inner product of $w^Tx$ will be $|w||x|cosQ$ - how is coefficient $b$ is then chosen? In the equation $y = ax + b$ it is clear that coefficient $b$ moves $ax$ up along y-axis. In case of $w^Tx + b$, it moves $w^Tx$ along the $w$ for the distance b? Is my intuition right? Can someone give some intuition?

$\endgroup$

1 Answer 1

1
$\begingroup$

I assume that $x$ is a variable and that $w$ is a constant vector and $b$ is a constant scalar. In the case $b=0$ you have $w^Tx=0$. This is solved by all $x$ that are perpendicular to the vector $w$. This means it describes the hyper-plane that goes through the origin with the normal vector $w$. In three dimensions you can imagine that every plane can be described by its normal vectors. If you imagine a 2d plane in 3d as a sheet of paper, you can get the normal by putting a thumbtack through the paper. The vector that is represented by the pin of the thumbtack is a normal vector.

The $-b$ essentially describes how far away the hyper-plane from the origin is in terms of the length and direction of $w$. For example $b=4.5$ moves the plane from the origin about $-4.5w$.

$\endgroup$
2
  • $\begingroup$ Yes, thank you! I was exactly interested in your last statement - seems like my intuition was correct - it is along w. $\endgroup$
    – John
    Commented May 18, 2017 at 9:39
  • $\begingroup$ Usually equations for hyper planes are written as $w^Tx = c$ but since you have $w^Tx +b=0$ with $b=-c$ you get that ugly minus sign :) $\endgroup$ Commented May 18, 2017 at 9:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .