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

NonLinearConjugateGradientOptimizer and BracketFinder TooManyEvaluationsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.5
    • 4.0, 3.6
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: