[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] Bug in reproducing gsl_multilinear_wfit test case
From: |
Jim Heasley |
Subject: |
[Bug-gsl] Bug in reproducing gsl_multilinear_wfit test case |
Date: |
Mon, 30 Apr 2012 11:12:32 -1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120412 Thunderbird/11.0.1 |
Below is an email exchange I had with Rhys Ulerich regarding my
inability to reproduce the
test case for the gsl_multiinear_wfit module. Rhys concluded thhat the
problem was due to the
use of a different random number generator. As noted at the end of his
email he suggested that I
ask that the example be documented as having used
GSL_RNG_TYPE=mt19937_1999 or that a
new test be published for the new default generator.
Thank you.
Jim Heasley
-------- Original Message --------
Subject: Re: [Bug-gsl] Bug(?) in reproducing gsl_multilinear_wfit test
case
Date: Thu, 26 Apr 2012 09:12:24 -0500
From: Rhys Ulerich <address@hidden>
To: address@hidden
CC: address@hidden
Hi Jim,
I have been unable to get the sample code that executes the
routine gsl_multilinear_wfit.c (which I literally cut and
pasted from the on-line HTML documentation) to give an answer
that is the same or even close to what is given in the
documentation.
....
My compiled code gives the result
# best fit: Y = 1.18246 + 0.184573 X + 1.3031 X^2
I also see the result you describe when copy'n'pasting from
http://www.gnu.org/software/gsl/manual/html_node/Fitting-Examples.html.
FWIW, I can reproduce the 'demo' program output shown earlier in that
section.
I think there has been a change to the default gsl_rng_env_setup
(http://www.gnu.org/software/gsl/manual/html_node/Random-number-environment-variables.html)
since when that example was written? Going through rng/ChangeLog I
noticed
Thu Jul 9 13:56:20 1998 Brian Gough<address@hidden>
* default.c (gsl_rng_env_setup): made gsl_rng_mt19937 the default
generator
but it looks like the fitting example in question was generated in
2001 (http://bzr.savannah.gnu.org/lh/gsl/trunk/revision/2797).
A quick sweep through the available random number generators (try
setting an incorrect GSL_RNG_TYPE value before running ./generate to
get a list) shows that the example in the documentation was produced
using the 'mt19937_1999' generator and not the current default.
Try running 'GSL_RNG_TYPE=mt19937_1999 ./generate | ./fit 19' to see
if it reproduces what the manual documents. It did for me.
If it does, please file a bug on savannah asking that either the
example be documented with this GSL_RNG_TYPE=mt19937_1999 detail or
the results be updated for the new default generator.
- Rhys