Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 65641 invoked from network); 10 Jun 2010 18:57:36 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Jun 2010 18:57:36 -0000 Received: (qmail 49371 invoked by uid 500); 10 Jun 2010 18:57:36 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 49226 invoked by uid 500); 10 Jun 2010 18:57:35 -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 49218 invoked by uid 99); 10 Jun 2010 18:57:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jun 2010 18:57:34 +0000 X-ASF-Spam-Status: No, hits=-1512.0 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jun 2010 18:57:34 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5AIvDM0003003 for ; Thu, 10 Jun 2010 18:57:13 GMT Message-ID: <21199039.28571276196233620.JavaMail.jira@thor> Date: Thu, 10 Jun 2010 14:57:13 -0400 (EDT) From: "Matt Price (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (MATH-372) Curve fitting appears unreliable In-Reply-To: <1705596.45301274825853192.JavaMail.jira@thor> 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-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877530#action_12877530 ] Matt Price commented on MATH-372: --------------------------------- A quick update... I've successfully gotten linear and non-linear regression working via Apache Commons Math for linear, point-to-point, log-log, 4PL and 5PL regression models. The troubles I had were due to errors in complex derivatives. My aim is to replace software that is currently using a commercial product (DataFitX). From what I can tell, Apache Commons Math is faster and more accurate that DataFitX. Good job Apache :) P.S. Wolfram Alpha is a great website for solving your regression model's derivatives (www.wolframalpha.com) > Curve fitting appears unreliable > -------------------------------- > > Key: MATH-372 > URL: https://issues.apache.org/jira/browse/MATH-372 > Project: Commons Math > Issue Type: Bug > Affects Versions: 2.1 > Environment: Win7 x64, Netbeans, JDK 1.6.0.18 > Reporter: Matt Price > Attachments: CurveFitterDebug.java, CurveFitting.ods > > Original Estimate: 8h > Remaining Estimate: 8h > > I've been trying to find a good curve fitting library for Java for the last couple of weeks. I came across Apache Commons Math and was really excited because I like all things Apache. The curve fitting API looks good and is fairly easy to use, however, it doesn't seem to be as accurate as it should/could be. > I've produced some code and data that shows that the initial parameter guesses affect the results too much. Guess low and the curve ends up low, guess high and the curve ends up high. I wish I had a stronger statistics/math background to make more sense of this. I've tried playing with the optimizer's options (costRelativeToTolerance, initialStepBoundFactor, maxEvaluations, maxIterations, orthTolerance and parRelativeTolerance) but nothing seems to improve the end result. > I've attached the spreadsheet and Java code. FYI, in the spreadsheet you'll see an entry in the chart for DataFitX. It is a COM library used in my company's current software that needs to be replaced. > Any help on this would be greatly appreciated. If you need more info, let me know and I'll supply it as quickly as I can. > Thanks, > Matt -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.