help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] puzzled with result from gsl_multifit_linear...


From: John Pye
Subject: Re: [Help-gsl] puzzled with result from gsl_multifit_linear...
Date: Thu, 22 Nov 2007 17:00:29 +1100
User-agent: Thunderbird 2.0.0.6 (X11/20071022)

Hi Brian

Brian Gough wrote:
> At Tue, 20 Nov 2007 12:53:31 +1100,
> John Pye wrote:
>   
>> I have a question about the use of the gsl_multifit_linear routine that
>> perhaps is a question more about geometry/algebra than coding, but I'm
>> not sure.
>>
>> I want to construct a routine that fits a plane (in three dimensions)
>> through a set of data points (x,y,z). I have set up gsl_multifit_linear
>> to fit the plane equation a*x + b*y + c*z = 1to my data, and for most
>> cases that seems to work OK. However there are a few degenerate cases
>> that don't work, and I'm trying to work out what I should do. Is there a
>> better equation that describes a plane?
>>     
>
> Hello,
>
> In the general case of this problem you need orthogonal regression
> (which is not something GSL has at the moment) -- i.e. minimisation of
> the orthogonal distance to the plane.  It's more complicated than
> linear regression.
>
> Linear regression only works if the model is written with a dependent
> variable, i.e. z = a*x + b*y + c, or similar.  This minimises the
> residual in the chosen direction -- if that's acceptable then you can
> use linear regression.
>   

Thanks for this. I think you may be right, and I should be implementing
this using orthogonal regression. Are you able to comment on the
correspondence of linear/orthogonal regression with my approach of
solving the overspecified system a*(x-x0)+b*(y-y0)+c*(z-z0)=0 using SVD?
My thought is that nothing in my approach makes any assumptions about
which is the 'dependent' coordinate, so it must therefore be treating
them all equally, no? In that case, perhaps this is equivalent to
orthogonal regression for this particular case?

Cheers
JP

-- 
John Pye
http://pye.dyndns.org







reply via email to

[Prev in Thread] Current Thread [Next in Thread]