Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.swapon.de!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail From: =?ISO-8859-1?Q?Hans-Bernhard_Br=F6ker?= Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Wrong fit direction / zrange / unreadable graph file Date: Thu, 19 May 2011 01:49:35 +0200 Lines: 20 Message-ID: <93j47sF2m1U1@mid.dfncis.de> References: <01ac512a-8031-41f0-a899-0684927f6c32@n10g2000yqf.googlegroups.com> <93c9dhFmvmU1@mid.individual.net> <93cqpmF1a3U1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.dfncis.de 0gWdLW0ESVeIE+ndhzMjLw4zf6OdtJhm7TLiqsv3HUMNw7Nhw1rViYBdrf Cancel-Lock: sha1:2RtQPJIBaYx5U07OQ4Au0KIRu5I= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: <93cqpmF1a3U1@mid.individual.net> Xref: x330-a1.tempe.blueboxinc.net comp.graphics.apps.gnuplot:322 On 16.05.2011 16:31, Ingo Thies wrote: > Strange. I see no reason for this since n is merely an additional offset > which could, depending on the function, even be negative. And the DNLS1E > routine from SLATEC doesn't have any problems here. How is fitting done > in gnuplot in particular? Marquardt-Levenberg via QR decomposition. > as does gnuplot with non-zero initial n. Maybe that routine has some > singular matrix trap which gnuplot doesn't have. The problem is not actually in the computations with matrices. It's in how gnuplot computes the derivatives of the model WRT the parameters at each data point (a.k.a. the "Jacobian" matrix). That derivative computation simply doesn't work at zero. The second part of the problem is that we don't normalize parameters to a common scale, so parameters of wildly different magnitude cause the fit to grind to a halt.