Filter löschen
Filter löschen

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

9 Ansichten (letzte 30 Tage)
Mic
Mic am 8 Aug. 2015
Beantwortet: Ghada Saleh am 10 Aug. 2015
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.

Akzeptierte Antwort

Ghada Saleh
Ghada Saleh am 10 Aug. 2015
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

Weitere Antworten (0)

Kategorien

Mehr zu Problem-Based Optimization Setup 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!

Translated by