Commits

Aleš Erjavec committed bcf96f0

Better classification tie breaking.

Comments (0)

Files changed (1)

orangekit/earth/earth.py

 
         if not self.multitarget and is_discrete(self.class_var):
             dist = Distribution(self.class_var)
+
+            # Random gen. for tie breaking.
+            dist.random_generator = Orange.misc.random.Random(hash(instance))
+
             if len(self.class_var.values) == 2:
                 probs = [1 - float(vals[0]), float(vals[0])]
             else: