Nonlinear regressions alternatives to nlinfit
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
msh
am 17 Apr. 2015
Kommentiert: Star Strider
am 17 Apr. 2015
Hi,
What are the available alternatives to 'nlinfit' in Matlab ? Is there a ridge type of regressions to be used for non-linear model ?
I am not satisfied with the nlinfit since, is very sensitive to the initial conditions given and in my case cannot make an educated guess on those. So, I am wondering where there are other nonlinear regression options in matlab suited for non-linear models.
UPDATE
I have an algorithm where the sample for y (dependent variable) and the sample for x's (explanatory variables) of the regression are generated from a particular economic model.
Now to solve my model, I have a loop where my data are generated. So in each loop I have a new sample and therefore a new regression. I use the nlinfit for those regressions, where in each iteration I use as initial guesses the coefficients found by the regression in the PREVIOUS iteration.
So it very easy now to understand where my algorithm crashes. There are instances where in a particular iteration step the initial guesses might be so bad making the nlinfit to crash (for example problems with the Jacobian)
Many thanks
0 Kommentare
Akzeptierte Antwort
Star Strider
am 17 Apr. 2015
You haven’t gone into any detail as to the problems you’re having with your regression, but if it is particularly difficult, use a Genetic Algorithm or other robust optimisation approach to estimate the parameters. Even if you don’t have the Global Optimization Toolbox, GAs are relatively easy to write, especially with MATLAB’s functionality. They can ‘guess’ the parameters with sufficient accuracy that nlinfit would be able to converge quickly with the GA output as initial parameter estimates.
4 Kommentare
Star Strider
am 17 Apr. 2015
My pleasure.
If you don’t mind computational cost or time, then the GA will likely work well for you. I suggest the MATLAB ga and related functions, but there are some third-party GA algorithms for MATLAB available as well.
Weitere Antworten (1)
John D'Errico
am 17 Apr. 2015
There is no magic wand that works perfectly. If there was, it would be in use. What a surprise!
While you CAN create a simple ridge type estimator for a nonlinear problem, they just bias the result towards zero. As arbitrarily, you could use it to bias the result towards any number you want, but if you already know the answer, then why bother to estimate it? At least if you know the answer, then you have good starting values for it, and if the estimation process drives away from there, then it means you have crap for data.
So get better starting values. Or get better data. Or use a model that actually fits your data, instead of trying to force some arbitrary model to your data.
In the end, I can't give you better advice without seeing your data, without seeing your model. I'd need to understand why it was that you chose the model you are trying to use. For example, it might be that you should be using a spline instead. Or maybe a partitioned least squares might be appropriate. But to just ask for other methods without knowing anything more would mean I need to write a book here. I'd be wasting my time to describe methods that are totally useless for you.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Systems of Nonlinear Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!