help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] GSL 1.9: Levenberg-Marquardt non-linear fit with selected inv


From: O. Hartmann
Subject: [Help-gsl] GSL 1.9: Levenberg-Marquardt non-linear fit with selected invariant coefficients not to be fit, HOWTO?
Date: Wed, 01 Aug 2007 08:27:52 +0000
User-agent: Thunderbird 2.0.0.5 (X11/20070726)


Hello,

while using GSL the first time (coming from some Numerical Recipes in C code pieces) I ran into trouble solving a non-linear least square problem. The problem ist simple, not to say trivial, some points need to get fitted in the usual way. The modell-function is a polynomial expression of degree 15 with 16 coefficients (a_0 - a_15) and in most cases we only fit the first coefficient, the constant (a_0). Sometimes we need to select some other coefficients to be fitted for making the polynomial fitting the dataset. Well, The Numerical Recipes code offers an elegant method using a 'mask' for each coefficient, if the corresponding switch in the mask (the mask represents the amount of coefficients) is set to 'false' or 0, the coefficient does not get touched and fitted, if set to else, the coefficient is handled as usual and gets fitted. These operations are done while preparing the covariant matrix. The GSL routines, as shown in the example in chapter 37: Nonlinear Least-Square Fitting seems not to offer a simple 'switch' to do the same as mentioned above. Does anyone do have a hint? One idea was to test if an coefficient has been marked 'fittable' while setting up the Jacobian matrix, but this is stupid and my math isn't that descent developed ...

Thanks in advance,
Oliver




reply via email to

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