Menu

#2 java.util.Random instead of Math.random

open
nobody
None
5
2008-03-21
2008-03-21
No

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

Discussion


Log in to post a comment.

MongoDB Logo MongoDB