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
|
|
0
|
|
|
|
Reply
|
fuaada
|
3/23/2010 7:08:27 AM |
|
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@gmail.com> wrote in message <d2944302-9239-432f-b9ae-b32cf4bca2a1@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
|
|
0
|
|
|
|
Reply
|
Yi
|
3/23/2010 8:54:06 AM
|
|
Thanks Yi....
>BTW, you may find 'fsolve' is more appropriate for your problem.
Would you mean 'fsolve' in maple?..I have no idea, could you please explain a little bit further...i know how to use 'fsolve' but i do not know how to relate estimation to Fsolve.
Thanks once again....
|
|
0
|
|
|
|
Reply
|
Fuaada
|
3/23/2010 11:18:25 AM
|
|
No, fsolve in Matlab Optimization Toolbox. Just typing 'help fsolve' will tell everything you want to know.
Yi
Fuaada <user@compgroups.net/> wrote in message <0dydnekll9AdPjXWnZ2dnUVZ_gKdnZ2d@giganews.com>...
> Thanks Yi....
>
> >BTW, you may find 'fsolve' is more appropriate for your problem.
>
> Would you mean 'fsolve' in maple?..I have no idea, could you please explain a little bit further...i know how to use 'fsolve' but i do not know how to relate estimation to Fsolve.
>
> Thanks once again....
>
> ---
> frmsrcurl: http://compgroups.net/comp.soft-sys.matlab/estimation-parameter-using-fminsearch
|
|
0
|
|
|
|
Reply
|
Yi
|
3/23/2010 1:52:06 PM
|
|
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......
|
|
0
|
|
|
|
Reply
|
fuaada
|
3/23/2010 4:15:38 PM
|
|
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@gmail.com> wrote in message
> <d2944302-9239-432f-b9ae-b32cf4bca2a1@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
|
|
0
|
|
|
|
Reply
|
James
|
3/23/2010 5:35:00 PM
|
|
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
|
|
0
|
|
|
|
Reply
|
James
|
3/23/2010 5:47:30 PM
|
|
fuaada <fuaada@gmail.com> wrote in message <d2944302-9239-432f-b9ae-b32cf4bca2a1@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
|
|
0
|
|
|
|
Reply
|
Fred
|
3/23/2010 6:40:27 PM
|
|
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@compgroups.net/> wrote in message <R8-dnZ05l563dDXWnZ2dnUVZ_sudnZ2d@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
|
|
0
|
|
|
|
Reply
|
Yi
|
3/23/2010 8:23:09 PM
|
|
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
|
|
0
|
|
|
|
Reply
|
fuaada (12)
|
3/24/2010 4:35:08 PM
|
|
Hello, after some trials adjusting the TolX and TolFun (as suggested by James), i managed to find the parameter values.It is working.....thanks everybody!
Fuaada
|
|
0
|
|
|
|
Reply
|
Fuaada
|
3/28/2010 3:20:48 PM
|
|
Hi all,
Corresponds to my previous question, even though i got the answer, i still unclear about the process..
I have n number of linear odes which contain 6 parameters. Here I have linear ODE system, N'=AN in matrix form. which A is non-diagonal matrix since i have coupled equations. The solution of the system is N(t)=Noexp(At). My case, No is a random initial condition and A containing parameter gamma,alpha1,alpha2,p,Vmax,Km. p is the probability.
I really need some advise for which parameter estimation solver should i refer to...
Are all the solver must require a starting parameter value. Is there any solver without asking the starting value?....or i should use Maximum Likelihood Estimation or Markov Chain Monte Carlo approach? I really have no idea about those approach...i have very little knowledge of statistical tool.....please help....
Fuaada
|
|
0
|
|
|
|
Reply
|
fuaada
|
3/29/2010 10:08:06 AM
|
|
|
15 Replies
966 Views
(page loaded in 1.563 seconds)
|