Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-1295

NonLinearConjugateGradientOptimizer and BracketFinder TooManyEvaluationsException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 4.0, 3.6
    • Labels:
      None

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              luke.lindsay Luke Lindsay
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: