Changeset 10552:c0028bc3f865 in orange


Ignore:
Timestamp:
03/15/12 18:45:13 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Replaced orange.TreeClassifier with Orange.classification.tree.TreeClassifier in channel types (needed for dynamic signals to work when connecting to Tree Graph/Viewer widgets).

Location:
Orange/OrangeWidgets
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Classify/OWC45Tree.py

    r9671 r10552  
    1111 
    1212from orngWrap import PreprocessedLearner 
     13 
     14import Orange 
     15 
    1316class OWC45Tree(OWWidget): 
    1417    settingsList = ["name", 
     
    2326        self.callbackDeposit = [] 
    2427 
    25         self.inputs = [("Data", ExampleTable, self.setData), ("Preprocess", PreprocessedLearner, self.setPreprocessor)] 
    26         self.outputs = [("Learner", orange.Learner),("Classification Tree", orange.TreeClassifier)]#, ("C45 Tree", orange.C45Classifier)] 
     28        self.inputs = [("Data", ExampleTable, self.setData), 
     29                       ("Preprocess", PreprocessedLearner, self.setPreprocessor)] 
     30         
     31        self.outputs = [("Learner", orange.Learner), 
     32                        ("Classification Tree", Orange.classification.tree.TreeClassifier)]#, ("C45 Tree", orange.C45Classifier)] 
    2733 
    2834        # Settings 
  • Orange/OrangeWidgets/Classify/OWClassificationTree.py

    r9671 r10552  
    3333        OWWidget.__init__(self, parent, signalManager, name, wantMainArea=0, resizingEnabled=0) 
    3434 
    35         self.inputs = [("Data", ExampleTable, self.setData), ("Preprocess", PreprocessedLearner, self.setPreprocessor)] 
    36         self.outputs = [("Learner", orange.TreeLearner), ("Classification Tree", orange.TreeClassifier), ("Classification Tree Graph", Orange.network.Graph)] 
     35        self.inputs = [("Data", ExampleTable, self.setData), 
     36                       ("Preprocess", PreprocessedLearner, self.setPreprocessor)] 
     37         
     38        self.outputs = [("Learner", Orange.classification.tree.TreeLearner), 
     39                        ("Classification Tree", Orange.classification.tree.TreeClassifier), 
     40                        ("Classification Tree Graph", Orange.network.Graph)] 
    3741 
    3842        self.name = 'Classification Tree' 
  • Orange/OrangeWidgets/Classify/OWClassificationTreeGraph.py

    r9671 r10552  
    88from OWTreeViewer2D import * 
    99import OWColorPalette 
     10 
     11import Orange 
    1012 
    1113class PieChart(QGraphicsRectItem): 
     
    201203        OWTreeViewer2D.__init__(self, parent, signalManager, name) 
    202204 
    203         self.inputs = [("Classification Tree", orange.TreeClassifier, self.ctree)] 
     205        self.inputs = [("Classification Tree", Orange.classification.tree.TreeClassifier, self.ctree)] 
    204206        self.outputs = [("Data", ExampleTable)] 
    205207 
  • Orange/OrangeWidgets/Classify/OWClassificationTreeViewer.py

    r10458 r10552  
    1111 
    1212import orngTree 
     13import Orange 
    1314 
    1415class ColumnCallback: 
     
    4647#        self.callbackDeposit = [] 
    4748 
    48         self.inputs = [("Classification Tree", orange.TreeClassifier, self.setClassificationTree)] 
     49        self.inputs = [("Classification Tree", Orange.classification.tree.TreeClassifier, self.setClassificationTree)] 
    4950        self.outputs = [("Data", ExampleTable)] 
    5051 
  • Orange/OrangeWidgets/Regression/OWRegressionTree.py

    r9671 r10552  
    1515 
    1616from orngWrap import PreprocessedLearner 
     17 
     18import Orange 
    1719 
    1820class OWRegressionTree(OWWidget): 
     
    3840        self.preprocessor = None 
    3941 
    40         self.inputs=[("Data",ExampleTable,self.dataset), ("Preprocess", PreprocessedLearner, self.setPreprocessor)] 
    41         self.outputs=[("Learner",orange.Learner),("Regressor",orange.Classifier),("Regression Tree",orange.TreeClassifier)] 
     42        self.inputs=[("Data",ExampleTable,self.dataset), 
     43                     ("Preprocess", PreprocessedLearner, self.setPreprocessor)] 
     44         
     45        self.outputs=[("Learner", orange.Learner), 
     46                      ("Regressor", orange.Classifier), 
     47                      ("Regression Tree", Orange.regression.tree.TreeClassifier)] 
    4248 
    4349        ## 
  • Orange/OrangeWidgets/Regression/OWRegressionTreeViewer2D.py

    r9671 r10552  
    99import re 
    1010 
    11          
     11import Orange 
     12 
    1213class RegressionTreeNode(GraphicsNode): 
    1314    def __init__(self, attr, tree, parent=None, *args): 
     
    126127        OWTreeViewer2D.__init__(self, parent, signalManager, name) 
    127128 
    128         self.inputs = [("Classification Tree", orange.TreeClassifier, self.ctree)] 
     129        self.inputs = [("Classification Tree", Orange.regression.tree.TreeClassifier, self.ctree)] 
    129130        self.outputs = [("Data", ExampleTable)] 
    130131         
Note: See TracChangeset for help on using the changeset viewer.