1. biolab
  2. Untitled project
  3. orange

Commits

Aleš Erjavec  committed 8eae763

Set random seed in modules_kmeans-run and modules_kmeans-run-callback scripts

  • Participants
  • Parent commits cf931af
  • Branches default

Comments (0)

Files changed (2)

File Orange/testing/regression/tests_20/modules_kmeans-run-callback.py

View file
  • Ignore whitespace
 import orange
 import orngClustering
 
+import random
+random.seed(42)
+
 def callback(km):
     print "Iteration: %d, changes: %d, score: %.4f" % (km.iteration, km.nchanges, km.score)
     

File Orange/testing/regression/tests_20/modules_kmeans-run.py

View file
  • Ignore whitespace
 import orange
 import orngClustering
-    
+
+import random
+random.seed(42)
+
 data = orange.ExampleTable("iris")
 km = orngClustering.KMeans(data, 3)
-print km.clusters[-10:]
+print km.clusters[-10:]
+