LFD Book Forum Q8 implementation question
 User Name Remember Me? Password
 Register FAQ Calendar Mark Forums Read

 Thread Tools Display Modes
#1
05-06-2013, 01:37 PM
 pyguy Junior Member Join Date: Apr 2013 Posts: 5
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.
#2
05-06-2013, 02:11 PM
 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,478
Re: Q8 implementation question

Quote:
 Originally Posted by pyguy 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.
__________________
Where everyone thinks alike, no one thinks very much
#3
05-06-2013, 08:15 PM
 pyguy Junior Member Join Date: Apr 2013 Posts: 5
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.
#4
05-07-2013, 06:18 AM
 jlevy Junior Member Join Date: Apr 2013 Posts: 5
Re: Q8 implementation question

Looks to me like the derivative is incorrect
__________________
Joe Levy
[URL="https://trustmeimastatistician.wordpress.com/"]Trust me, I'm a statistician[/URL]

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home General     General Discussion of Machine Learning     Free Additional Material         Dynamic e-Chapters         Dynamic e-Appendices Course Discussions     Online LFD course         General comments on the course         Homework 1         Homework 2         Homework 3         Homework 4         Homework 5         Homework 6         Homework 7         Homework 8         The Final         Create New Homework Problems Book Feedback - Learning From Data     General comments on the book     Chapter 1 - The Learning Problem     Chapter 2 - Training versus Testing     Chapter 3 - The Linear Model     Chapter 4 - Overfitting     Chapter 5 - Three Learning Principles     e-Chapter 6 - Similarity Based Methods     e-Chapter 7 - Neural Networks     e-Chapter 8 - Support Vector Machines     e-Chapter 9 - Learning Aides     Appendix and Notation     e-Appendices

All times are GMT -7. The time now is 03:12 AM.

 Contact Us - LFD Book - Top