[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Linear regression
From: |
Juan Pablo Carbajal |
Subject: |
Re: Linear regression |
Date: |
Tue, 13 May 2014 16:35:09 +0200 |
On Tue, May 13, 2014 at 4:26 PM, Hannibal Smith <address@hidden> wrote:
> % Add a column of all ones (intercept term) to x
> X = [ones(m, 1) x];
> % Calculate theta
> theta = (pinv(x'*x))*x'*y;
Your problem is in the lines above, check carefully where are you
storing the values and what are you using for your regression. Also,
your question is a borderliner, do not expect the community to worry
about your problems if you do not put an effort to write your mails
and make your debuging code readable and short (yeah, succinct)
- Linear regression, Hannibal Smith, 2014/05/13
- Re: Linear regression,
Juan Pablo Carbajal <=