commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MATH-1128) Lazy evaluation needed in "o.a.c.m.fitting.leastsquares"
Date Sun, 15 Jun 2014 15:02:01 GMT

     [ https://issues.apache.org/jira/browse/MATH-1128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gilles updated MATH-1128:
-------------------------

    Attachment: MATH-1128.patch

Here the proposed patch.

Mainly, it introduces a "LazyUnweightedEvaluation" where the computation of the model and
Jacobian are deferred until one or the other is actually requested.
Also, there is a new "LocalMultivariateJacobianFunction" class that replaces the anymous class
that was created when calling the "model" method.
The "evaluate" method of "LocalLeastSquaresProblem" instantiates either "UnweightedEvaluation"
or "LazyUnweightedEvaluation", as requested by the user of the "create" factory method.

Any objection to applying this patch?


> Lazy evaluation needed in "o.a.c.m.fitting.leastsquares"
> --------------------------------------------------------
>
>                 Key: MATH-1128
>                 URL: https://issues.apache.org/jira/browse/MATH-1128
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.3
>            Reporter: Gilles
>            Assignee: Gilles
>              Labels: regression
>             Fix For: 3.4
>
>         Attachments: MATH-1128.patch
>
>
> 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".



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message