Commits

Aleš Erjavec committed 3bad5a9

Reimplement __str__ method to avoid an error from the base class.

Comments (0)

Files changed (1)

_multitarget/tree.py

         node = self.descender(self.tree, instance)[0]
         return node.node_classifier(instance, return_type)
 
+    def __str__(self):
+        # Orange.classification.tree.TreeClassifier.__str__ raises an
+        # exception because our domain does not have a class_var
+        # so we bypass it (at least for now).
+        return Orange.classification.Classifier.__str__(self)
+
 
 if __name__ == '__main__':
     data = Orange.data.Table('multitarget-synthetic')