Orange Forum • View topic - PATCH: Typo in orngCN2.CN2SDUnorderedLearner

PATCH: Typo in orngCN2.CN2SDUnorderedLearner

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: Typo in orngCN2.CN2SDUnorderedLearner

Postby yang » Thu Mar 03, 2011 5:11

This was in the 2.0.0b release. It's fixed in trunk but there's no new release yet (on PyPI) so this may be useful to others.

Code: Select all
--- orngCN2.py.backup   2011-03-02 20:09:58.000000000 -0800
+++ orngCN2.py  2011-03-02 20:10:16.000000000 -0800
@@ -435,7 +435,7 @@
             return self
         
     def __init__(self, evaluator = WRACCEvaluator(), beamWidth = 5, alpha = 0.05, mult=0.7, **kwds):
-        CN2UnorderedLearnerClass.__init__(self, evaluator = evaluator,
+        CN2UnorderedLearner.__init__(self, evaluator = evaluator,
                                           beamWidth = beamWidth, alpha = alpha, **kwds)
         self.coverAndRemove = CovererAndRemover_multWeights(mult=mult)
 
@@ -443,7 +443,7 @@
         supervisedClassCheck(examples)
         
         oldExamples = orange.ExampleTable(examples)
-        classifier = CN2UnorderedLearnerClass.__call__(self,examples,weight)
+        classifier = CN2UnorderedLearner.__call__(self,examples,weight)
         for r in classifier.rules:
             r.filterAndStore(oldExamples,weight,r.classifier.defaultVal)
         return classifier
(env)

Return to Bugs



cron