|
Re: puzzled with result from gsl_multifit_linear...: msg#00048lib.gsl.general
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/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: A few questions about finding all zeros of Hermite polynomial: 00048, Brian Gough |
|---|---|
| Next by Date: | help compiling and generating a program: 00048, Hsiang Wei Lee |
| Previous by Thread: | Re: puzzled with result from gsl_multifit_linear...i: 00048, John Gehman |
| Next by Thread: | Re: puzzled with result from gsl_multifit_linear...: 00048, John Pye |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |