R script to plot and update optim() values after each iteration

33 views Asked by At

I am trying to write a R script to plot the values of the optim() function against the number of iterations. However, I don't know the number of iterations that the function will run for, as the function I am optimizing is complex. I want to see how the function values decrease with iterations, so I can determine a reasonable stopping criterion. I want this plot to be updated after each iteration is complete.

I know optimParallel has a built in feature that enables tracing of optimization path with L-BFGS-B algorithm but I am using the BFGS algorithm for optimization.

Appreciate any help with this.

0

There are 0 answers