Mrqmin-damping factors and convergence


anykvist
10-24-2007, 04:29 AM
Hi,

I've implemented the mrqmin routine in order to solve a minimisation problem, involving a simple exponential trend y = a*exp(b*t).
However, I've been facing some problems in being able find the true parameters (a,b) that minimise the squared errors. Compared to the solution provided by the Solver in Excel, the mrqmin routine doesn't seem to fit the intercept correctly and the output parameters appear to be very sensitive in relation to the input parameters I provide for a and b.

My function which calculates the function values and partial derivatives look like this:
void fexp(const double x, double *a,double *yfit, double *dyda,long i_dim, long j_dim)
{
int na=j_dim;
double tmp_err;
double fac;
double fac1;
double fac2;
double x_hat;
double efunc;
double a0=0.0;
double a1=0.0;
fac1 =0.0;
fac2= 0.0;

tmp_err = 0.0;
*yfit = 0.0;
x_hat =0.0;
fac = 0.0;
dyda[0] = 0.0;
dyda[1] = 0.0;
efunc= 0.0;

a0 =a[0];
a1 = a[1];
efunc= a0*exp(a1*x);
*yfit = efunc;
dyda[0] = exp(a1*x);
dyda[1] = x*efunc;

}

Does anyone have any experiences on determning the factor for adjusting the alamda paramter in the mrqmin-routine? I'm currently using 0.01.
Should this factor be adjusted according to the magnitude of your function values?
Does the routine require that the input parameters a,b are close to the "true" values of a and b minimizing the squared errors?

I would be very greatful for any help on these matters.

anykvist

asadullahbeg
01-31-2014, 02:25 PM
Hi did u solve your problem?