From issues-return-41928-apmail-commons-issues-archive=commons.apache.org@commons.apache.org Mon Jun 16 08:36:07 2014 Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4453A11EA7 for ; Mon, 16 Jun 2014 08:36:07 +0000 (UTC) Received: (qmail 38381 invoked by uid 500); 16 Jun 2014 08:36:02 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 38291 invoked by uid 500); 16 Jun 2014 08:36:02 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 38280 invoked by uid 99); 16 Jun 2014 08:36:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jun 2014 08:36:01 +0000 Date: Mon, 16 Jun 2014 08:36:01 +0000 (UTC) From: "Luc Maisonobe (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MATH-1128) Lazy evaluation needed in "o.a.c.m.fitting.leastsquares" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MATH-1128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14032228#comment-14032228 ] Luc Maisonobe commented on MATH-1128: ------------------------------------- Seems OK to me. > 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)