[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Pkg-octave-devel] Bug#348480: marked as done (octave2.1: polyfit breaks down over "large" x values)



Your message dated Sun, 15 Mar 2009 08:14:23 GMT
with message-id <200903150814.n2F8ENFA005105@kmos.homeip.net>
and subject line octave2.1 has been removed from Debian, closing #348480
has caused the Debian Bug report #348480,
regarding octave2.1: polyfit breaks down over "large" x values
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
348480: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348480
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: octave2.1
Version: 1:2.1.72-8
Severity: normal

There are reports [1-4] over the years on the octave mailing lists about
octave's polyfit function.  When the x-values are "large" (e.g. 1000s
instead of 1s) then the fit at higher orders (e.g. order 10) is completely
screwed up.

Some of the reports [1] suggest prescaling (e.g. divide x-values by 1000)
before fitting. This does work.

Others [2,3] provide a script to fix the problem. Unfortunately they do NOT
work successfully for me (same bad fitting is obtained).

Another [4] claims that the problem is fixed in wpolyfit from octave-forge.
Unfortunately this is in fact NOT the case. wpolyfit gives the same
incorrect result as polyfit.

So I'm filing this bug to document the problem, rather than letting
half-rumoured fixes float littered somewhere on mailing lists. I guess
you'll want to notify upstream if you agree the problem is really.

The misbehaviour can be seen from my attached sample data, scripting as
follows:

	inputData = load( "test.dat" );
    	x = inputData( : , 1 );
      	y = inputData( : , 2 );
      	P = polyfit(x,y,10);
	polyval(P,x);
	
The coefficients in P are strangely all close to zero (< 1E-25).

Rescaling x provides the desired non-zero coefficients and an "exact" fit of
the original data:

	inputData = load( "test.dat" );
    	x = inputData( : , 1 );
      	y = inputData( : , 2 );
	xscaled = x/1000;
      	P = polyfit(xscaled,y,10);
	for k=1:columns(P)
	      power = columns(P)-k;
	      P(k) = P(k) / (1000^power );
	endfor
	polyval(P,x);

It'd be nice if this were to be fixed in polyfit itself, or at least if
wpolyfit would fix it as it's claimed to in [4].


[1] http://www.octave.org/octave-lists/archive/help-octave.1999/msg01008.html
[2] http://www.octave.org/octave-lists/archive/help-octave.1999/msg01027.html
[3] http://www.octave.org/octave-lists/archive/help-octave.1999/msg01052.html
[4] http://www.octave.org/octave-lists/archive/bug-octave.2004/msg00807.html

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.14
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)

Versions of packages octave2.1 depends on:
ii  atlas3-base [liblapack.s 3.6.0-20        Automatically Tuned Linear Algebra
ii  fftw3                    3.0.1-14        library for computing Fast Fourier
ii  lapack3 [liblapack.so.3] 3.0.20000531a-6 library of linear algebra routines
ii  libc6                    2.3.5-11        GNU C Library: Shared libraries an
ii  libgcc1                  1:4.0.2-6       GCC support library
ii  libgfortran0             4.0.2-6         Runtime library for GNU Fortran ap
ii  libhdf5-serial-1.6.4-0c2 1.6.4-4         Hierarchical Data Format 5 (HDF5) 
ii  libncurses5              5.5-1           Shared libraries for terminal hand
ii  libreadline5             5.1-5           GNU readline and history libraries
ii  libstdc++6               4.0.2-6         The GNU Standard C++ Library v3
ii  refblas3 [libblas.so.3]  1.2-8           Basic Linear Algebra Subroutines 3
ii  texinfo                  4.8-4           Documentation system for on-line i
ii  zlib1g                   1:1.2.3-9       compression library - runtime

octave2.1 recommends no packages.

-- no debconf information


--- End Message ---
--- Begin Message ---
Version: 1:2.1.73-19+rm

The octave2.1 package has been removed from Debian so we are closing
the bugs that were still opened against it.

For more information about this package's removal, read
http://bugs.debian.org/516402 . That bug might give the reasons why
this package was removed, and suggestions of possible replacements.

Don't hesitate to reply to this mail if you have any question.

Thank you for your contribution to Debian.

Kind regards,
--
Marco Rodrigues


--- End Message ---

Reply to: