mathnet-numerics icon indicating copy to clipboard operation
mathnet-numerics copied to clipboard

BfgsMinimizer - ReasonForExit

Open MartinCernak opened this issue 1 year ago • 2 comments

In the BfgsMinimizer, the reason for exit is always the absolute gradient.

 return new MinimizationWithLineSearchResult(candidate, iterations, ExitCondition.AbsoluteGradient, totalLineSearchSteps, iterationsWithNontrivialLineSearch);

I believe that the reason for termination should be set by checking the conditions of termination.

return new MinimizationWithLineSearchResult(candidate, iterations, currentExitCondition, totalLineSearchSteps, iterationsWithNontrivialLineSearch);

It's not a big deal, but it can help when setting optimization parameters...

MartinCernak avatar Sep 27 '24 14:09 MartinCernak

Hi,

Yes, this seems like a legitimate change. Would you like to open a PR?

jkalias avatar Sep 28 '24 11:09 jkalias

Hi, @jkalias, yes, I can.

MartinCernak avatar Oct 01 '24 07:10 MartinCernak