Ignore:
Timestamp:
04/20/12 16:02:22 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Added back single tree output using the simple tree converter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Regression/OWRandomForestRegression.py

    r11627 r11628  
    55<contact>Marko Toplak (marko.toplak(@at@)gmail.com)</contact> 
    66<priority>320</priority> 
    7 <keywords>bagging, ensemble</keywords> 
     7<tags>bagging,ensemble</tags> 
    88 
    99""" 
     
    2020 
    2121        self.outputs = [("Learner", orange.Learner), 
    22                         ("Random Forest Classifier", orange.Classifier)] 
     22                        ("Random Forest Classifier", orange.Classifier), 
     23                        ("Selected Tree", Orange.classification.tree.TreeClassifier)] 
    2324 
    2425    def setData(self, data): 
    25         self.data = self.isDataWithClass(data, orange.VarTypes.Continuous, checkMissing=True) and data or None 
    26          
     26        if not self.isDataWithClass(data, orange.VarTypes.Continuous, 
     27                                    checkMissing=True): 
     28            data = None 
     29        self.data = data 
     30 
     31        self.streeEnabled(False) 
    2732        if self.data: 
    2833            learner = self.constructLearner() 
     
    3237                self.classifier = learner(self.data) 
    3338                self.classifier.name = self.name 
     39                self.streeEnabled(True) 
    3440            except Exception, (errValue): 
    3541                self.error(str(errValue)) 
Note: See TracChangeset for help on using the changeset viewer.