Message Boards Message Boards

1 Reply
1 Total Likes
View groups...
Share this post:

NonlinearModelFit screws up the fit when facing constraints

Posted 11 years ago
Hello everybody.
I am using a model of several gaussians to fit infrared absorption data. For this purpose, I define the resonances I expect at certain wavenumbers (i.e. the wavelength) using "NormalDistribution" and then use the sum of them as my model.
To find starting values, I use an interactive "Manipulate" environment which is working nicely. Using these, Mathematica finds the fit requested rather quick. Some of the parameters are running to values which are not physical. Therefore, I wanted to restrict these parameters using the constraints as described in the Documentation. As soon as I have a constraint on a single parameter, Mathematica takes much longer to compute a fit and the output is much worse or even absolutely stupid (meaning there is no "fit" at all!).

This behaviour I do not understand and would like to know how I can circumvent this situation (either using a different function than "NonlinearModelFit" or some other options.

Any opinion on this is welcome!

Best regards

PS: I am working on a short example for you guys. I will provide it as soon as possible.
Have a look there for an earlier problem of the same kind

basically one has to restrict the parameters to an area where
  • the solution lies
  • no singularities of the model take place
NonlinearModelFit[] can't resist a singularity of the model because of it's usage of the Marquardt-Levenberg-Algorithm as one of its algorithms. 
POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract