LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Chapter 3 - The Linear Model (http://book.caltech.edu/bookforum/forumdisplay.php?f=110)
-   -   Linear Regression and x0 (http://book.caltech.edu/bookforum/showthread.php?t=343)

 tcristo 04-14-2012 01:44 PM

Linear Regression and x0

For our linear regression implementation, do we include x0 in as part of our original X matrix? If we do, that means our original vector X=(x0, x1, x2) would then be transposed to XT=(x2, x1, x0).

 yaser 04-14-2012 01:48 PM

Re: Linear Regression and x0

Quote:
 Originally Posted by tcristo (Post 1282) For our linear regression implementation, do we include x0 in as part of our original X matrix? If we do, that means our original vector X=(x0, x1, x2) would then be transposed to XT=(x2, x1, x0).
Transposition changes column to row and vice versa, but not the order of the elements within the column/row.

 tcristo 04-14-2012 02:01 PM

Re: Linear Regression and x0

Quote:
 Originally Posted by yaser (Post 1283) Transposition changes column to row and vice versa, but not the order of the elements within the column/row.
That makes more sense to me! So I assume we are including our constant (x0) in our matrix since we want the final results to provide three weight values?

 yaser 04-14-2012 10:17 PM

Re: Linear Regression and x0

Quote:
 Originally Posted by tcristo (Post 1284) That makes more sense to me! So I assume we are including our constant (x0) in our matrix since we want the final results to provide three weight values?
Exactly.

In the mathematical formulation, is an integral part of and is an integral part of .

 mathprof 04-15-2012 09:20 AM

Re: Linear Regression and x0

Without x0=1, our line (or hyperplane) would be constrained to go through the origin, which would very rarely be useful.

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