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: Brian Gough
Subject: Re: [Help-gsl] puzzled with result from gsl_multifit_linear...
Date: Tue, 20 Nov 2007 21:00:29 +0000
User-agent: Wanderlust/2.14.0 (Africa) Emacs/22.1 Mule/5.0 (SAKAKI)

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.

-- 
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/




reply via email to

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