Orange Forum • View topic - PATCH: RandomForestLearner weights not being passed along

PATCH: RandomForestLearner weights not being passed along

Report bugs (or imagined bugs).
(Archived/read-only, please use our ticketing system for reporting bugs and their discussion.)
Forum rules
Archived/read-only, please use our ticketing system for reporting bugs and their discussion.

PATCH: RandomForestLearner weights not being passed along

Postby yang » Tue Mar 08, 2011 21:25

This is a bug in the current svn HEAD and in 2.0.0b. The weights are not being passed along by the RandomForestLearner to the wrapped learner.

Code: Select all
$ svn diff Orange/ensemble/forest.py
Index: Orange/ensemble/forest.py
===================================================================
--- Orange/ensemble/forest.py   (revision 10314)
+++ Orange/ensemble/forest.py   (working copy)
@@ -134,7 +134,7 @@
                 selection.append(self.rand.randrange(n))
             data = instances.getitems(selection)
             # build the model from the bootstrap sample
-            classifiers.append(learner(data))
+            classifiers.append(learner(data, weight))
             if self.callback:
                 self.callback()
             # if self.callback: self.callback((i+1.)/self.trees)

Return to Bugs