Description
I am getting the exception below when using NonLinearConjugateGradientOptimizer.
org.apache.commons.math3.exception.TooManyEvaluationsException: illegal state: maximal count (50) exceeded: evaluations
at org.apache.commons.math3.optim.univariate.BracketFinder.eval(BracketFinder.java:287)
at org.apache.commons.math3.optim.univariate.BracketFinder.search(BracketFinder.java:181)
at org.apache.commons.math3.optim.nonlinear.scalar.LineSearch.search(LineSearch.java:127)
at org.apache.commons.math3.optim.nonlinear.scalar.gradient.NonLinearConjugateGradientOptimizer.doOptimize(NonLinearConjugateGradientOptimizer.java:283)
at org.apache.commons.math3.optim.nonlinear.scalar.gradient.NonLinearConjugateGradientOptimizer.doOptimize(NonLinearConjugateGradientOptimizer.java:47)
at org.apache.commons.math3.optim.BaseOptimizer.optimize(BaseOptimizer.java:154)
at org.apache.commons.math3.optim.BaseMultivariateOptimizer.optimize(BaseMultivariateOptimizer.java:66)
at org.apache.commons.math3.optim.nonlinear.scalar.MultivariateOptimizer.optimize(MultivariateOptimizer.java:64)
at org.apache.commons.math3.optim.nonlinear.scalar.GradientMultivariateOptimizer.optimize(GradientMultivariateOptimizer.java:74)
at org.apache.commons.math3.optim.nonlinear.scalar.gradient.NonLinearConjugateGradientOptimizer.optimize(NonLinearConjugateGradientOptimizer.java:245)
NonLinearConjugateGradientOptimizer calls the no argument constructor of BracketFinder which defaults its max evaluations to 50. I tried changing the source code of BracketFinder so that the default max evaluations is 200 and since making the change have not encountered the problem. I was wondering if BracketFinder could have its default max evaluations increased or if NonLinearConjugateGradientOptimizer could set a higher max evaluations when it constructs a BracketFinder.