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

Lazy evaluation needed in "o.a.c.m.fitting.leastsquares"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Implemented
    • 3.3
    • 3.4
    • None

    Description

      In "LocalLeastSquaresProblem" (private inner class defined in "o.a.c.m.fitting.leastsquares.LeastSquaresFactory"), the "evaluate" method computes the values of both the model and the Jacobian at creation of the "Evaluation" instance.
      Optimizers ("LevenbergMarquardtOptimizer" in particular) may not need both for all of the evaluated points. And this can lead to too many evaluations of the model which in some applications is the costliest part.

      In my use-case, the current code in "o.a.c.m.fitting.leastquares" leads to a performance degradation of about 20% w.r.t. the implementation in "o.a.c.m.optim.nonlinear.vector.jacobian".

      Attachments

        1. MATH-1128.patch
          15 kB
          Gilles Sadowski

        Activity

          People

            erans Gilles Sadowski
            erans Gilles Sadowski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: