From: James Allison on
Reusing the end point is unlikely improve results. Trying multiple
starting points (e.g., using samples from lhsdesign) might help, but if
you are hitting MaxFunEvals or MaxIter, that is an indication that
something else is wrong. What is the nature of the function you are
trying to fit to your data? Is it a polynomial, etc.? You may need to
adjust the algorithm tolerances and scale your optimization variables
(e.g., so that they are all the same order of magnitude).

Also, is there a reason you have not tried fminunc? It may be much
faster than fminsearch, assuming your objective function is continuous
and smooth.

If you need further help you can contact technical support
(mathworks.com -> support -> contact support).

-James

Yi Cao wrote:
> Fuaada,
>
> This message means your search is not converged, hence the result is not
> optimal. You can either increase the number of MaxFunEvals and MaxIter
> through options, or you can use the EXITFLAG to set up a conditional
> loop to use the return result as the initial guess. The EXITFLAG will be
> 0 in the above case. Therefore, you can use a while loop as follows.
>
> exitflag = 0;
> x=x0; % initial guess.
> while ~exitflag
> [x,fval,exitflag] = fminsearch(func,x,...)
> end
>
> BTW, you may find 'fsolve' is more appropriate for your problem.
>
> HTH.
> Yi
>
> fuaada <fuaada(a)gmail.com> wrote in message
> <d2944302-9239-432f-b9ae-b32cf4bca2a1(a)t23g2000yqt.googlegroups.com>...
>> Hello,
>>
>> ...i am puzzled. My problem is to work out the parameter estimation of
>> my model. I have 6 parameters. My objective function is too long to
>> put in here. the aim is to get the minimum of the sum of square error
>> SSE value. when i run using fminsearch algorithm, i got message
>> 'increase the MaxFunEvals'. when i increase it using 'options', still
>> got the same message and sometimes the system asking for 'increase
>> MaxIter'. Is it okay if i just take the estimated value, eventhough
>> the message still appear. I am also confused, why the SSE value
>> change everytime we change the MaxFunEvals value?...can someone here
>> explain what is actually happen when we run the fminsearch algorithm.
>> Your response are greatly appreciated...please help me.........
>>
>> Fuaada
From: James Allison on
I agree that fsolve will not be appropriate here; it is unlikely that
the model will fit the data exactly, which is what fsolve will try to do.

This helps to know that you are estimating parameters for ODEs (see my
previous post as well). With any numerical simulation, the derivative of
the output with respect to the parameters is not completely smooth
because of the discretization in time. To accommodate for this you will
need to increase (loosen) the tolerances in fminsearch. You may want to
do some sampling to get an idea of how much noise is in the response,
and then adjust the tolerances accordingly. Also, can you describe more
precisely what is random in your problem?

Finally, you might be interested in trying out Simulink Design
Optimization, which can perform parameter estimation and handles
algorithm tolerances automatically:

http://www.mathworks.com/products/sl-design-optimization/

Best Regards,

-James


fuaada wrote:
> Thanks....emm...i dont think fsolve can solve my problem since i have random number of linear ODEs. I solve my model using linear algebra method: which is dealing with eigenvalues and eigen vectors. The data that i obtained from my model, will be fitted to the experimental data, so that i do hope using fminsearch i can estimate the related parameters....:)....the big problem now is i could not find the optimum values of parameters as no convergence when i was using fminsearch....i really need help.....any idea please.......
>
> ---
> frmsrcurl: http://compgroups.net/comp.soft-sys.matlab/estimation-parameter-using-fminsearch
From: Fred Sigworth on
fuaada <fuaada(a)gmail.com> wrote in message <d2944302-9239-432f-b9ae-b32cf4bca2a1(a)t23g2000yqt.googlegroups.com>...
> Hello,
>
> ...i am puzzled. My problem is to work out the parameter estimation of
> my model. I have 6 parameters. My objective function is too long to
> put in here. the aim is to get the minimum of the sum of square error
> SSE value. when i run using fminsearch algorithm, i got message
> 'increase the MaxFunEvals'. when i increase it using 'options', still
> got the same message and sometimes the system asking for 'increase
> MaxIter'. Is it okay if i just take the estimated value, eventhough
> the message still appear. I am also confused, why the SSE value
> change everytime we change the MaxFunEvals value?...can someone here
> explain what is actually happen when we run the fminsearch algorithm.
> Your response are greatly appreciated...please help me.........
>
> Fuaada

You might want to try my alternative to fminsearch, called the "State machine simplex minimizer", no. 4317 on the Mathworks File Exchange. I find it much better for monitoring the progress of an optimization.
-Fred Sigworth
From: Yi Cao on
Fuaada,

What you described is a nonlinear lease square problem. For such a problem, much more efficient algorithms are available. In Matlab optimization toolbox, these algorithms are implemented in lsqnonlin, whilst fsolve is a special version of lsqnonlin, designed particularly to solve nonlinear equations as you described. If you read more on 'doc lsqnonlin' and 'doc fsolve' you will know what I mean. The difference between fminsearch (or fminunc) and fsolve (or lsqnonlin) is that the former is for general nonlinear optimization, hence only takes information from a scalar cost function, whilst the later takes information from multiple equation residuals, hence, algorithms are more efficient. These algorithms can achieve second-order convergence without calculating the Hessian. For example, it is well known that Levenberg-Marquardt based neural network training algorithms are much more
efficient than other gradient based approaches.

HTH
Yi


fuaada <user(a)compgroups.net/> wrote in message <R8-dnZ05l563dDXWnZ2dnUVZ_sudnZ2d(a)giganews.com>...
> Thanks....emm...i dont think fsolve can solve my problem since i have random number of linear ODEs. I solve my model using linear algebra method: which is dealing with eigenvalues and eigen vectors. The data that i obtained from my model, will be fitted to the experimental data, so that i do hope using fminsearch i can estimate the related parameters....:)....the big problem now is i could not find the optimum values of parameters as no convergence when i was using fminsearch....i really need help.....any idea please......
>
> ---
> frmsrcurl: http://compgroups.net/comp.soft-sys.matlab/estimation-parameter-using-fminsearch
From: fuaada on
Dear All,

Thanks for all the ideas..some of the terms that you are using sound not really familiar to me.... i need to recall of optimization techniques, it was my 10 years ago!....

Thanks and Thanks!
Fuaada

---
frmsrcurl: http://compgroups.net/comp.soft-sys.matlab/estimation-parameter-using-fminsearch