Ignore:
Location:
Orange
Files:
8 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         
  • Orange/data/io.py

    r10532 r10550  
    451451        elif index == -1: 
    452452            res.append(str[start:]) 
    453     return res 
     453    return [r.replace(escape + split_str, split_str) for r in res] 
    454454 
    455455def is_standard_var_def(cell): 
     
    673673    missing_map = dict.fromkeys(missing_flags, "?") 
    674674    missing_translate = lambda val: missing_map.get(val, val) 
    675         
     675     
    676676    # Create domain variables or corresponding place holders 
    677677    for i, (name, var_t) in enumerate(zip(header, types)): 
     
    818818        for v in all_vars: 
    819819            if isinstance(v, variable.Discrete): 
    820                 type_cells.append(",".join(v.values)) 
     820                escaped_values = [val.replace(" ", r"\ ") for val in v.values] 
     821                type_cells.append(" ".join(escaped_values)) 
    821822            elif isinstance(v, variable.Continuous): 
    822823                type_cells.append("continuous") 
  • Orange/testing/unit/tests/test_table.py

    r10461 r10551  
    8181            f.flush() 
    8282            f.seek(0) 
    83             Orange.data.io.load_csv(f) 
     83            Orange.data.io.load_csv(f, has_header=True, 
     84                                    has_types=True, has_annotations=True) 
    8485 
    8586 
Note: See TracChangeset for help on using the changeset viewer.