java.util.Random instead of Math.random
Status: Beta
Brought to you by:
leyan
In order to obtain repeatable experiments, Math.random calls should be replaced with calls to a seeded java.util.Random object (the current approach results in the classifier to return different results for subsequent runs with the same options!). All randomizations in Weka use the java.util.Random approach and Math.random is outlawed.
Instead of subclassing weka.classifiers.Classifier, weka.classifiers.RandomizableClassifier could be used for this (and then passing a seeded java.util.Random object to classes that need randomization).
Cheers, Peter