Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!w8g2000prd.googlegroups.com!not-for-mail
From: fas <faisalmufti@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: linear regression
Date: Sun, 18 May 2008 21:51:40 -0700 (PDT)
Organization: http://groups.google.com
Lines: 33
Message-ID: <a2ecc712-6761-49f4-adb2-964bf87af489@w8g2000prd.googlegroups.com>
References: <13a0ad36-75d8-4ca0-b585-727d3a8ce1a9@w8g2000prd.googlegroups.com> 
NNTP-Posting-Host: 150.203.45.195
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1211172700 19551 127.0.0.1 (19 May 2008 04:51:40 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 19 May 2008 04:51:40 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: w8g2000prd.googlegroups.com; posting-host=150.203.45.195; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.14) 
Bytes: 2748
Xref: news.mathworks.com comp.soft-sys.matlab:469147


On May 18, 9:29 pm, "John D'Errico" <woodch...@rochester.rr.com>
wrote:
> fas <faisalmu...@gmail.com> wrote in message <2e7d4e65-1ce4-4bf3-
>
> 8ab3-81f0bae46...@c19g2000prf.googlegroups.com>...
>
> > Ok, X and Y were for an example case are of size 100. In actual X and
> > Y are both of 2D of size (100x100  again example case). I converted
> > them to vectorized form as 10000x1. So I have 10000 equations each for
> > one point and now I want to fit polyfit. But the problem is that as
> > they are converted from 2D matrix. If I plot in 1D they do not appear
> > right and hence I believe polyfit may not work. The other option I can
> > think of is to sort it after converting it into vectorized form, so
> > that then can come in some order (for of some curve). Will it be ok to
> > apply polyfit on it. Will the coefficient that I find will have same
> > meaning or if the regression is done on the same 2D function (some
> > how)
> > Thanks,
>
> What does not "appear" right?
>
> If your model is as stated, then this is correct.
>
> I think that you are asking to do a 2-d regression,
> in both the x and y directinos, but for some reason
> do not realize that is what you want to do. Or, you
> just don't want to admit it.
>
> John

I admit that I wan to to do 2D regression. So if I want to to do that
then doing a vectorization and sorting and then regression may not be
right (Is it?). So in that case how to to 2D regression ?