machinelearning
machinelearning copied to clipboard
Add/expose random seed in LearningPipeline to get deterministic results
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.
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);
I'll prefer
// Variant 3: Parameter to .Train()
var m = p.Train(seed:1234);
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.
With a few PRs already merged as well as the proposed #371 , this issue can now be closed.