Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2380DD20E for ; Fri, 6 Jul 2012 22:30:25 +0000 (UTC) Received: (qmail 24982 invoked by uid 500); 6 Jul 2012 22:30:24 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 24911 invoked by uid 500); 6 Jul 2012 22:30:23 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 24903 invoked by uid 99); 6 Jul 2012 22:30:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2012 22:30:23 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [193.74.71.28] (HELO sif.is.scarlet.be) (193.74.71.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2012 22:30:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scarlet.be; s=scarlet; t=1341613796; bh=rQALbZP6Cs9//E5O4tmGo2HhoSaI3ncZS+hjtJcnRls=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=VD2ydBVuuBLQAJh7E+y/iobCOPoeCg5P1Ybc4xASHTx+Qkk3sRclTa+lroEVaiO51 aG6EsQOXrpkJ48TtrOcb8FcozSTWGOYrOs6eH1MplUjGNlUwdHC8BeIwpVaJFVBmt+ WCFmeWf4LjkHawwa/zyFgg+v3mFpviU7HN673ryg= Received: from mail.harfang.homelinux.org (ip-213-49-232-24.dsl.scarlet.be [213.49.232.24]) by sif.is.scarlet.be (8.14.5/8.14.5) with ESMTP id q66MTtsw012698 for ; Sat, 7 Jul 2012 00:29:56 +0200 X-Scarlet: d=1341613796 c=213.49.232.24 Received: from localhost (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 8BC45618AB for ; Sat, 7 Jul 2012 00:29:55 +0200 (CEST) Received: from mail.harfang.homelinux.org ([192.168.20.11]) by localhost (mail.harfang.homelinux.org [192.168.20.11]) (amavisd-new, port 10024) with ESMTP id vI1JLhy3IXec for ; Sat, 7 Jul 2012 00:29:52 +0200 (CEST) Received: from dusk.harfang.homelinux.org (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 9B5A86177E for ; Sat, 7 Jul 2012 00:29:52 +0200 (CEST) Received: from eran by dusk.harfang.homelinux.org with local (Exim 4.77) (envelope-from ) id 1SnH28-0002rT-GZ for user@commons.apache.org; Sat, 07 Jul 2012 00:29:52 +0200 Date: Sat, 7 Jul 2012 00:29:51 +0200 From: Gilles Sadowski To: user@commons.apache.org Subject: Re: [math] Message-ID: <20120706222951.GB25337@dusk.harfang.homelinux.org> Mail-Followup-To: user@commons.apache.org References: <20120705210618.GJ30289@dusk.harfang.homelinux.org> <20120705215231.GK30289@dusk.harfang.homelinux.org> <20120706095305.GC20488@dusk.harfang.homelinux.org> <20120706200526.GL30289@dusk.harfang.homelinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Tiny Tux X-PGP-Key-Fingerprint: 53B9 972E C2E6 B93C BEAD 7092 09E6 AF46 51D0 5641 User-Agent: Mutt/1.5.21 (2010-09-15) X-DCC-scarlet.be-Metrics: sif 20002; Body=1 Fuz1=1 Fuz2=1 X-Virus-Scanned: clamav-milter 0.97.1-exp at sif X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Jul 06, 2012 at 09:39:30PM +0000, Italo Maia wrote: > > Hummm, so my assumption that my previous values for a, b and c were the best are wrong. I calculated the resid and it is really smaller. Real thanks for that! I wouldn't take the difference too seriously, given that the data are not really close to the curve. The errors seem quite large. > Any tips on calculating the r-squared? No. Gilles > > Date: Fri, 6 Jul 2012 22:05:26 +0200 > From: gilles@harfang.homelinux.org > To: user@commons.apache.org > Subject: Re: [math] > > Hi. > > If you are using the function > > a * Math.pow(t, b) * Math.exp(-c * t) > > the gradient is: > > { Math.pow(t, b) * Math.exp(-c * t), > a * Math.log(t) * Math.pow(t, b) * Math.exp(-c * t), > -a * t Math.pow(t, b) * Math.exp(-c * t) } > > > // No idea what goes here. Nothing seems to work. > > Well, the gradient (partial derivatives w.r.t the parameters) is the thing > that will work; the attached figure shows the data and the function that > fits it with > a = 1.097378664278161 > b = 0.4273818336149512 > c = 0.01457006142420487 > > > > > a, b and c for this example should be: A: 1.0782 B: 0.4583 C: 0.0166 > > The fit is slightly better with the values found by "CurveFitter" > (the "LevenbergMarquardt" algorithm actually). > > Regards, > Gilles > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org