Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!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 14:02:33 +0200 Lines: 28 Message-ID: <93kf65Feq2U1@mid.dfncis.de> References: <01ac512a-8031-41f0-a899-0684927f6c32@n10g2000yqf.googlegroups.com> <93c9dhFmvmU1@mid.individual.net> <93cqpmF1a3U1@mid.individual.net> <93j47sF2m1U1@mid.dfncis.de> <93k4v6F1lmU1@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 RuiUBN9d1+h6evTrlq2hQwWlx2UXOp1Oe9OoJzOxaigS33gVcxhYr3ug7r Cancel-Lock: sha1:/D3OMyR0YTvtpgglcSbx3AcscZE= 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: <93k4v6F1lmU1@mid.individual.net> Xref: x330-a1.tempe.blueboxinc.net comp.graphics.apps.gnuplot:328 On 19.05.2011 11:07, Ingo Thies wrote: > Hmm, I do not see why > > d/da (a+b*x) > > should cause troubles at a=0, unless there is some kind of scaling the > differences (rather than differentials in numerics) da by a, so that da > may become zero if a is. ... which is exactly what we do. The derivative in question is usually computed as (f(a*1.001,b)-f(a,b))/(a*0.001). As that would yield nonsense for a==zero, we replace all values in the region of -1e30> 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. > In the given example the number of iterations is pretty small, so that I > won't assume any kind of numerical stall here. Actually, in the problematic cases reported here, the reason the number of iterations was so small was that the fit progress was so slow that the algorithm mistook it for convergence (relative change of chisquare below the limit). Note how 'n' got stuck at basically the first non-zero value it acquired (1e-30), and never changed again. That's a typical symptom of parameter scale mismatch.