bug-gsl
[Top][All Lists]
Advanced

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

[Bug-gsl] [bug #36366] multifit_linear example uses old default random n


From: Rhys Ulerich
Subject: [Bug-gsl] [bug #36366] multifit_linear example uses old default random number generator
Date: Wed, 02 May 2012 01:32:51 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.78 Safari/535.11

URL:
  <http://savannah.gnu.org/bugs/?36366>

                 Summary: multifit_linear example uses old default random
number generator
                 Project: GNU Scientific Library
            Submitted by: rhysu
            Submitted on: Wed 02 May 2012 01:32:50 AM GMT
                Category: Documentation
                Severity: 2 - Minor
        Operating System: 
                  Status: Confirmed
             Assigned to: rhysu
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any

    _______________________________________________________

Details:

>From Jim Heasley
To: address@hidden

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

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





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36366>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]