LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   The Final (http://book.caltech.edu/bookforum/forumdisplay.php?f=138)
-   -   Question 11 (http://book.caltech.edu/bookforum/showthread.php?t=1561)

fgpancorbo 09-16-2012 09:10 PM

Question 11
 
I have used LIBSVM; the answer that I get is one of a) to d) if I scale it appropriately. However, if I scale it, the margin in the transformed domain is not any more +/-1 at the support vectors. So technically the answer proposed is right (since it separates the points with a maximum margin) but it doesn't satisfy the requirement that the margins be +/- 1 at the support vectors.

yaser 09-16-2012 10:05 PM

Re: Question 12
 
Quote:

Originally Posted by fgpancorbo (Post 5375)
I have used LIBSVM; the answer that I get is one of a) to d) if I scale it appropriately. However, if I scale it, the margin in the transformed domain is not any more +/-1 at the support vectors. So technically the answer proposed is right (since it separates the points with a maximum margin) but it doesn't satisfy the requirement that the margins be +/- 1 at the support vectors.

Just to make sure, this is a double-check on the answer as the question asks explicitly for a geometric solution. Right?

fgpancorbo 09-16-2012 10:16 PM

Re: Question 12
 
Quote:

Originally Posted by yaser (Post 5377)
Just to make sure, this is a double-check on the answer as the question asks explicitly for a geometric solution. Right?

Correct. I did it with LIBSVM though :D. I have verified that the libsvm solution provides margins equal to 1 for the support vectors. By scaling it via a positive constant I get one of the four.

Thanks,

Fernando.

yaser 09-16-2012 10:40 PM

Re: Question 12
 
Quote:

Originally Posted by fgpancorbo (Post 5378)
Correct. I did it with LIBSVM though :D.

LIBSVM is getting popular :). Someone even applied it to the puzzle from Lecture 1 if you remember that.

http://book.caltech.edu/bookforum/sh...21&postcount=6

fgpancorbo 09-16-2012 10:58 PM

Re: Question 12
 
Quote:

Originally Posted by yaser (Post 5382)
LIBSVM is getting popular :). Someone even applied it to the puzzle from Lecture 1 if you remember that.

http://book.caltech.edu/bookforum/sh...21&postcount=6

I guess that given that we have libsvm, my lazy inside refused to do sit down and write the problem on paper :D.

MLearning 09-17-2012 10:51 AM

Re: Question 12
 
Quote:

Originally Posted by yaser (Post 5377)
Just to make sure, this is a double-check on the answer as the question asks explicitly for a geometric solution. Right?

Geometrically, it is clear to see what the values of the weights and b should be. My results using a geometric approach match the results I get using Octave implemenation of SVM. Of course, libsvm also confirms my results as it always has the final say :) in matters related to SVM :).

jforbes 06-10-2013 07:30 PM

Re: Question 12
 
It seems like the original question was never answered.

Geometrically, one can find a w1, w2, and b which define the separating plane. Clearly you get the same plane if you multiply w1, w2, and b by some constant A. In the SVM formalism A was fixed so that w.z+b=1 at the nearest positive point.

Do we need to
-choose the w1, w2, and b which define the correct plane AND have the correct A, or
-is it sufficient to choose one of the infinitely many w1, w2, and b which define the correct plane without necessarily having the correct normalization A?

It's also possible that the correct answer has the correct normalization and I've made some mistake.

yaser 06-10-2013 07:50 PM

Re: Question 12
 
Quote:

Originally Posted by jforbes (Post 11090)
Geometrically, one can find a w1, w2, and b which define the separating plane. Clearly you get the same plane if you multiply w1, w2, and b by some constant A. In the SVM formalism A was fixed so that w.z+b=1 at the nearest positive point.

Do we need to
-choose the w1, w2, and b which define the correct plane AND have the correct A, or
-is it sufficient to choose one of the infinitely many w1, w2, and b which define the correct plane without necessarily having the correct normalization A?

It is the latter, with no normalization needed. Since the wording of the problem asks for what values specify the plane, a set of values that does specify the plane would be the correct answer and if none of them does then it's none of the above.

jforbes 06-10-2013 08:24 PM

Re: Question 12
 
Quote:

Originally Posted by yaser (Post 11091)
It is the latter, with no normalization needed. Since the wording of the problem asks for what values specify the plane, a set of values that does specify the plane would be the correct answer and if none of them does then it's none of the above.

Great - looking back I agree that the question wording is unambiguous, though perhaps for this problem the graph of P(getting the right answer) vs Carefulness is non-monotonic. Thank you!

yaser 06-10-2013 08:35 PM

Re: Question 12
 
Quote:

Originally Posted by jforbes (Post 11092)
the graph of P(getting the right answer) vs Carefulness is non-monotonic

:)


All times are GMT -7. The time now is 01:20 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.