comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: General fitting framework
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: General fitting framework [message #65271] Wed, 25 February 2009 13:09 Go to previous message
Rob.Dimeo is currently offline  Rob.Dimeo
Messages: 21
Registered: September 2007
Junior Member
This should be pretty straightforward to write (having gone through a
similar exercise some years ago...no, I'm not volunteering). The key
point is making the interface to the fitting function (e.g.
MPCURVEFIT, GA_FIT, PSO_FIT, etc.) sufficiently general (i.e.
identical) so that the user can specify the fitting method through a
GUI interface, for instance, and then using CALL_FUNCTION or CALL
PROCEDURE for the fitting. I tried to do just this with a particle
swarm optimization algorithm and the genetic algorithm optimizer. I
forced both of these functions to have a similar interface and
keywords as Craig Markwardt's MPCURVEFIT. Then they could be called
in the same way as Craig's algorithm.

You don't really need to use objects to do this but I've found them to
be pretty useful in making a general-purpose fitting application,
particularly with handling the fitting components and data where the
data is multi-dimensional.

Rob

On Feb 25, 1:03 pm, Giorgio <giorgiol...@gmail.com> wrote:
> Hi,
>  For my research work, the data analysis is often reduced to fit data
> with a model. For that I often use MPfit which is a basically
> Levenberg-Marquardt algorithm. In general this performs well however I
> found that it depends a lot on the initial guess of the parameters and
> it often gets stuck in a local minima. There are other open source
> optimization algorithms written in IDL like genetic algorithms (Rob
> Dimeo's code) or simulated annealing (Kling's book). I am thinking in
> a way to implement a general fitting program that allow you to choose
> which algorithm to use.  The best way I thought it will be by using
> object oriented programming. The different class objects can be:
>  -  A class to hold the data, this can be either 2D or 1D data.
>  -  A class to perform the function evaluations. The way that mpfit
> treats the function is quite general. This would have the function
> string and the number of parameters supported by the function. One
> method will be the evaluation of the function with the values
> positions where to do it.
>  - A function to evaluate the difference between the data and the
> model function. This is usually the chi-squared function but it can
> also be another one like the sum of the absolute difference. I did not
> know yet which if the best approach is a function or an object.
>  - A class for the parameters to handle the parinfo structure define
> in the mpfit program.
>  - And finally, a class to define a general framework for the
> optimization algorithms. Each precise algorithm will be a child of
> this class and will contain the algorithms parameters in it.
>  This is the general framework I thought about. By looking at this I
> realized that it will take a lot of time for me alone to do it since I
> will do it in my spare time. So my questions will be: Are there any
> suggestions or ideas of which will be a better implementation of this?
> And is there someone who will like to contribute or help me in doing
> this?
>
> Thanks,
>
> Giorgio
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: General fitting framework
Next Topic: Re: V7.0.6 release notes

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 14:51:16 PDT 2025

Total time taken to generate the page: 1.28146 seconds