LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Homework 5 (http://book.caltech.edu/bookforum/forumdisplay.php?f=134)
-   -   Q8 implementation question (http://book.caltech.edu/bookforum/showthread.php?t=4270)

 pyguy 05-06-2013 01:37 PM

Q8 implementation question

I'm trying to compute the stochastic gradient descent for linear regression, and the formula I'm using is: I'm running the experiment with what I believe to be the correct inputs, but I'm not getting the what I expect to be the output, so I'm trying to trace my steps and see where I went wrong. I was looking at the formula, and one part that I was uncertain about was the part. Aren't and both 1x3 row vectors? If I transpose , and multiply, I'd get a 3x3 matrix which didn't make sense to me in the calculation, so I'm essentially multiplying them right now as if they were just 1x3 row vectors.

 yaser 05-06-2013 02:11 PM

Re: Q8 implementation question

Quote:
 Originally Posted by pyguy (Post 10725) I'm trying to compute the stochastic gradient descent for linear regression, and the formula I'm using is: I'm running the experiment with what I believe to be the correct inputs, but I'm not getting the what I expect to be the output, so I'm trying to trace my steps and see where I went wrong. I was looking at the formula, and one part that I was uncertain about was the part. Aren't and both 1x3 row vectors? If I transpose , and multiply, I'd get a 3x3 matrix which didn't make sense to me in the calculation, so I'm essentially multiplying them right now as if they were just 1x3 row vectors.
The convention is that vectors are column vectors, so is an inner product, not an outer product.

 pyguy 05-06-2013 08:15 PM

Re: Q8 implementation question

Thank you! I knew I was missing something with the math and my best guess was I was doing something wrong there.

 jlevy 05-07-2013 06:18 AM

Re: Q8 implementation question

Looks to me like the derivative is incorrect

 All times are GMT -7. The time now is 08:14 AM.