Reliable Curve-Fitting Routine in C/C++ | Get Expert Advice

  • Thread starter Thread starter james4321
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around finding a reliable curve-fitting routine in C or C++, specifically addressing issues with the Levenberg-Marquardt method and exploring alternative approaches such as genetic algorithms. The scope includes technical explanations and potential solutions for curve fitting challenges.

Discussion Character

  • Technical explanation, Debate/contested

Main Points Raised

  • One participant expresses dissatisfaction with the Levenberg-Marquardt routine from numerical recipes, citing frequent failures.
  • Another participant suggests that the choice of fitting parameters in the Levenberg-Marquardt routine may need adjustment, claiming it is generally a robust methodology.
  • A different participant proposes using a genetic algorithm to optimize the parameters for the Levenberg-Marquardt routine.
  • Several participants acknowledge the difficulty of fitting certain data even after adjusting parameters, indicating that some datasets may present unique challenges.
  • Participants express a lack of expertise in genetic algorithms and seek recommendations for accessible code or packages to implement these methods.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the effectiveness of the Levenberg-Marquardt routine, as some suggest parameter adjustments while others highlight persistent fitting difficulties. The discussion also reflects uncertainty regarding the implementation of genetic algorithms.

Contextual Notes

Participants mention the need for expertise in genetic algorithms and the challenges of fitting specific datasets, indicating limitations in their current knowledge and tools.

Who May Find This Useful

Individuals interested in curve fitting techniques, particularly in C or C++, and those exploring alternative optimization methods may find this discussion relevant.

james4321
Messages
6
Reaction score
0
I am looking for a reliable curve fitting routine (preferrably in C or C++). Currently I use Levenberg-Marquardt routine from numerical recipes but it fails frequently. Your adivce will be appreciated.
 
Physics news on Phys.org
your choice of fitting parameters in the Levenberg-Marquardt routine needs to be changed, usually that is one of the most robust methodologies out there.
 
Use a genetic algorithm method to find the optimal Levenberg parameters?
 
Thank you Dr Transport and Pythagorean for you reply.

"your choice of fitting parameters in the Levenberg-Marquardt routine needs to be changed"
I do this but some data are very difficult to fit even with this.

"Use a genetic algorithm method to find the optimal Levenberg parameters?"
Unfortunately I have no expertise in genetic algorithms. I wish I know how to use these algorithms as they are very useful. Do you recommend any code or package that can do this with little experience?
 
Thank you Dr Transport for you reply.

"your choice of fitting parameters in the Levenberg-Marquardt routine needs to be changed"
I do this but some data are very difficult to fit even with this.
 
Thank you Pythagorean for you reply.

"Use a genetic algorithm method to find the optimal Levenberg parameters?"
Unfortunately I have no expertise in genetic algorithms. I wish I know how to use these algorithms as they are very useful. Do you recommend any code or package that can do this with little experience?
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K