필터 지우기
필터 지우기

Fminsearch doesn't converge but MLE value doesn't change

조회 수: 12 (최근 30일)
Mic
Mic 2015년 8월 8일
답변: Ghada Saleh 2015년 8월 10일
Hello,
I'm maximizing a MLE in order to find the optimal parameters to approximate an unknown function. Unfortunately the function is not converging even after 60.000 iterations. These are my options:
options = optimset('Display','iter','MaxIter', 60000,'MaxfunEvals',60000,'TolFun',1e-10);
However the value of the MLE doesn't change across iterations. What does it mean? Are the parameters that the program spits out correct?
I tried with different values for TolFun e per esempio con 1e-4 la funzione converge (e sia parametri che il valore del MLE sono uguali a quelli con 1e-10).
Thank you.

채택된 답변

Ghada Saleh
Ghada Saleh 2015년 8월 10일
Hi Mic,
I understand that 'fminsearch' does not converge to a solution even though the objective function does not change value. One possibility is that the command window output display format default is short, fixed-decimal format for floating-point notation. Hence, the objective function value might be changing but you cannot see that change in the command window.
A possible workaround is to change the precision of the data displayed for the optimal objective function value. You can use 'Output Functions' to customize the output data from the optimization problem at each iteration.
To do this, follow the following steps:
1. Change the command window format display to 'long', so that you can see the maximum number of digits of your variable. You can do this by adding the following command to your script before calling the optimization function.
>> format long;
2. Set the 'Output Function' up. You specify the output function in options, such as
>> options = optimset(options,'OutputFcn',@outfun);
3. Write your own 'outfun' function. For an example on how to do this, please refer to the following link: http://www.mathworks.com/help/optim/ug/output-functions.html
4. Use the 'disp' command to display the objective function's value.
I hope this helps,
Ghada

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by