Yes, it is possible and can be achieved by two completely different ways.
You can specify two stopping criteria: gradient-based and iteration-based one. When optimizer is terminated by iteration-based criteria, you visualize result and call it one more time. However, optimizer will be restarted from scratch - it will lose all information accumulated so far except for the point where it was stopped.
Maybe it is better to use another option - to turn on reports with minlbfgssetxrep() function and to pass rep callback to minlbfgsoptimize(). In this case you will be able to visualize iterations without restarting algorithm.
|