Optimset applied to fminunc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Optimset applied to fminunc

lucam1968
Hello,

I am quite new to Octave and provided I have a quite "heavy" optimisation
problem (> 2 hours machine running time).

I would like to print the iteration # during the running of fminunc so that
I can check the progress made. however, I do not seem to succeed - i.e.
nothing is printed:

options = optimset('Display', 'iter', 'MaxIter', 50);
[nn_params, cost] = fminunc(costFunction, initial_nn_params, options);

Any idea on how can I solve that?

Thanks,

Luca



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: Optimset applied to fminunc

siko1056
lucam1968 wrote

> Hello,
>
> I am quite new to Octave and provided I have a quite "heavy" optimisation
> problem (> 2 hours machine running time).
>
> I would like to print the iteration # during the running of fminunc so
> that
> I can check the progress made. however, I do not seem to succeed - i.e.
> nothing is printed:
>
> options = optimset('Display', 'iter', 'MaxIter', 50);
> [nn_params, cost] = fminunc(costFunction, initial_nn_params, options);
>
> Any idea on how can I solve that?
>
> Thanks,
>
> Luca

Dear Luca,

Which Octave version are you running?  In versions < 4.4.0 the pager is
active by default. This means, that the output of the computation is
deferred until it's done.  To avoid this, you should start your computation
with

    more off

And you might see the iteration progress when it happens.

HTH,
Kai



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: Optimset applied to fminunc

lucam1968
Hi Kai,

Thank you for your reply.

I am running the 4.2.2 version on a Mac and I do not seem to be able to
visualise the number of iteration the fminunc is currently processing even
after running the

more off

command. What I would like to have is something similar to the Iterative
Display shown on
https://www.mathworks.com/help/optim/ug/iterative-display.html, any idea on
how I can get on my version of Octave?

Thanks,

Luca



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: Optimset applied to fminunc

siko1056
lucam1968 wrote

> Hi Kai,
>
> Thank you for your reply.
>
> I am running the 4.2.2 version on a Mac and I do not seem to be able to
> visualise the number of iteration the fminunc is currently processing even
> after running the
>
> more off
>
> command. What I would like to have is something similar to the Iterative
> Display shown on
> https://www.mathworks.com/help/optim/ug/iterative-display.html, any idea
> on
> how I can get on my version of Octave?
>
> Thanks,
>
> Luca

Sorry for my fast naive guessing.  For Octave it is currently not
implemented, see: https://savannah.gnu.org/bugs/?44918

Maybe you just type

    edit fminunc

and append "disp (value)" statements to display the values of your interest.

HTH,
Kai



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html