[mlpack-svn] [MLPACK] #182: Random number generators always use the same seed

MLPACK Trac trac at coffeetalk-1.cc.gatech.edu
Fri Jan 13 14:45:37 EST 2012

#182: Random number generators always use the same seed
  Reporter:  march        |        Owner:     
      Type:  enhancement  |       Status:  new
  Priority:  minor        |    Milestone:     
 Component:  mlpack       |   Resolution:     
  Keywords:               |     Blocking:     
Blocked By:               |  
Changes (by rcurtin):

 * cc: jcline3, nslagle (added)


 I didn't realize we weren't initializing a random seed on startup.  That
 one's pretty easy to fix, but the bigger issue I've struggled with for a
 bit longer.

 > at least allow the user to specify a seed before generating numbers

 There are a couple ways to do this and I am not sure which to go with.

 1.  Have CLI take another builtin option (--seed), like --help and --info,
 which sets the random seed.  This has a drawback in that now, a --seed
 option is available for a method which has no use or need of random number
 generators.  Alternately... only include the `PARAM_INT("seed", ...)` in
 random.hpp so that --seed only appears when the developer includes

 2.  Have CLI (or some other similar singleton which is always built at
 startup time) just set the seed to `time(NULL)` or similar.  Then, if an
 application wants to be able to change the seed, it just adds its own
 option in its main() file and handles it there.

 I'm CCing Neil and James because I'd like their opinions, too, on which to
 go with.  I'm not sure which is the better choice.

Ticket URL: <https://trac.research.cc.gatech.edu/fastlab/ticket/182#comment:1>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed by the FASTLAB at Georgia Tech under Dr. Alex Gray.

More information about the mlpack-svn mailing list