1
$\begingroup$

How is it possible to find $\gamma$ from the following equation?

$\omega^T (x − γ\frac{w}{||w||}) + b = 0$

note that x,w are vectors and b,γ are scalar.

I have read that the solution is:

$γ = \frac{(w^Tx) + b}{||w||}$

However, I do not know how it is computed. I tried to remove $\omega^T$ using $\omega^{T^{-1}}$ , but things got worse.

Edit: fixed a mistake: γ is scalar. Thanks.

$\endgroup$
  • $\begingroup$ what is $y$ here? $\endgroup$ – James S. Cook Aug 30 '13 at 9:45
  • $\begingroup$ What would $w^{T^{-1}}$ even be, considering that $w$ is a scalar? $\endgroup$ – lokodiz Aug 30 '13 at 9:46
2
$\begingroup$

$0=\omega^{T}(x-\gamma\frac{\omega}{\|\omega\|})+b=\omega^{T}x-\gamma\frac{\omega^{T}\omega}{\|\omega\|}+b$

So $\gamma\frac{\omega^{T}\omega}{\|\omega\|}=\omega^{T}x+b$.

Note that $\omega^{T}\omega=\|\omega\|^{2}$ so the above reduces to

$\gamma\|\omega\|=\omega^{T}x+b$ so

$\gamma=\frac{\omega^{T}x+b}{\|\omega\|}$.

$\endgroup$
1
$\begingroup$

You cannot premultiply with $(\omega^T)^{-1}$, because $\omega^T$ is a row-vector and it generally doesn't have an inverse.

Do this:

$$0 = \omega^T \left(x − γ\frac{\omega}{||\omega||}\right) + b = \omega^T x − γ\frac{\omega^T \omega}{||\omega||} + b$$

and then use the fact that $a^Ta = \|a\|^2$ for all vectors $a$.

P.S. $γ$ is obviously a scalar, and you're mixing $w$ and $\omega$.

$\endgroup$
1
$\begingroup$

You need to use the distributive property over vector addition of the dot product: $$ a(b+c)=ab+ac $$ and notice that: $$ \frac{a^Ta}{\|a\|} = \|a\|$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.