machinelearning icon indicating copy to clipboard operation
machinelearning copied to clipboard

Add/expose random seed in LearningPipeline to get deterministic results

Open GalOshri opened this issue 8 years ago • 4 comments

It is important to be able to set a random seed for ML experiments so the results are reproducible. Add random seed to LearningPipeline (or elsewhere) to ensure a full experiment is deterministic.

GalOshri avatar May 04 '18 20:05 GalOshri

Which of those variants do you prefer?

  // Variant 1: Constructor
  var p = new LearningPipeline(seed:1234);

  // Variant 2: Property
  p.seed = 1234;

  // Variant 3: Parameter to .Train()
  var m = p.Train(seed:1234);

markusweimer avatar May 04 '18 23:05 markusweimer

I'll prefer

// Variant 3: Parameter to .Train()
var m = p.Train(seed:1234);

zeahmed avatar May 11 '18 19:05 zeahmed

Seriously, enough is enough I think. Let's just expose IHostEnvironment. That's our mechanism to solve this and other problems, it's worked well for years doing exactly this among all its other functions.

TomFinley avatar May 11 '18 23:05 TomFinley

With a few PRs already merged as well as the proposed #371 , this issue can now be closed.

shauheen avatar Jun 28 '18 21:06 shauheen