Curve Fitting Problem
Jaroslav Hajek
highegg at gmail.com
Fri Jun 27 00:34:35 CDT 2008
On Fri, Jun 27, 2008 at 6:37 AM, A. Kalten <akalten at comcast.net> wrote:
> On Thu, 26 Jun 2008 19:52:32 -0700 (PDT)
> Sergei Steshenko <sergstesh at yahoo.com> wrote:
>
>>
>> If I understand your problem correctly, is more or less like this;
>>
>> 1) there is f(x) to be approximated;
>> 2) the desired approximation is:
>>
>> a * x^2 + b * x + c;
>>
>
> In this case there is no function to be approximated. There
> is only data that fits a theoretical model. I was inquiring
> about any off-the-shelf algorithms that can fit a function
> to a data set where some of the parameters of the function
> need to be constrained in a certain way.
>
I think there are at least two implementations of the
levenberg-marquardt algorithm in OctaveForge's optim package. Having a
matlab-compatible lsqnonlin in Octave would be good. In general,
making the optimization stuff more systematic and matlab-compatible is
a worthy long-term goal.
It's on my TODO list, too :) A couple of months ago I have proposed to
include also other parts of MINPACK (which is employed for fsolve) to
implement lsqnonlin. I was ready to volunteer for this project (which
would benefit me as well). However, JWE suggested that Octave could
employ GSL in the future, which has the MINPACK algorithms rewritten
in C,
in a reentrant and safe way. On the contrary, making MINPACK reentrant
(which I think is desirable) would involve modifying the code.
I have thus decided to postpone any work on the optimization routines
until the future of GSL in Octave is clear. GSL would probably allow
us to get rid of much (if not all) of libcruft, however, it has its
problems as well. One thing is that GSL does not support floats
(single precision) almost anywhere; now that Octave supports them that
could cause problems.
Also, GSL cannot (not even optionally) employ LAPACK for linear
algebra (which is faster and more elaborate than GSL's own LA stuff).
I am not aware of the status of GSL in Octave at this moment.
regards
> AK
>
> _______________________________________________
> Help-octave mailing list
> Help-octave at octave.org
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
More information about the Help-octave
mailing list