LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Homework 2 (http://book.caltech.edu/bookforum/forumdisplay.php?f=131)
-   -   PLA and Regression implementation issue (http://book.caltech.edu/bookforum/showthread.php?t=2140)

edeas 10-15-2012 04:13 AM

PLA and Regression implementation issue
 
Please i would like to know if there is a difference between padding my feature vectors with 1 or -1.

I used -1 in hw1 because it seemed more logical, as the threshold (theta-zero) would change sign when it moves to the other side of the equation.

Now for the regression equation, i am abit confused of what is actually the correct approach. (Though i am assuming it doesnt matter).

what am i not getting?

yaser 10-15-2012 10:17 AM

Re: PLA and Regression implementation issue
 
Quote:

Originally Posted by edeas (Post 6384)
Please i would like to know if there is a difference between padding my feature vectors with 1 or -1.

I used -1 in hw1 because it seemed more logical, as the threshold (theta-zero) would change sign when it moves to the other side of the equation.

Now for the regression equation, i am abit confused of what is actually the correct approach. (Though i am assuming it doesnt matter).

what am i not getting?

Setting x_0=+1 or x_0=-1 is equivalent, with the corresponding weight parameter w_0 changing signs accordingly. In this course, we adopted the convention x_0=+1, treating w_0 as a "bias" term rather than a threshold.


All times are GMT -7. The time now is 02:37 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, 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.