Changeset 7414:feb627c6a756 in orange


Ignore:
Timestamp:
02/04/11 12:17:45 (3 years ago)
Author:
markotoplak
Branch:
default
Convert:
47ed6f585d00709446ca491c53d935575e427fc0
Message:

Remapped orngC45 module to new tree (tested).

Location:
orange
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/classification/tree.py

    r7407 r7414  
    20572057                _c45_showBranch(node, classvar, lev, i) 
    20582058 
    2059 def c45_printTree(tree): 
     2059def printTreeC45(tree): 
    20602060    """ 
    20612061    Prints the tree given as an argument in the same form as Ross Quinlan's  
     
    20642064    :: 
    20652065 
    2066         import orange, orngC45 
     2066        import orange 
     2067        import Orange.classification.tree as tree 
    20672068 
    20682069        data = orange.ExampleTable("voting") 
    2069         c45 = orange.C45Learner(data) 
    2070         orngC45.printTree(c45) 
     2070        c45 = tree.C45Learner(data) 
     2071        tree.printTreeC45(c45) 
    20712072 
    20722073    will print out 
     
    20742075    :: 
    20752076 
     2077        physician-fee-freeze = n: democrat (253.4) 
    20762078        physician-fee-freeze = y: 
    20772079        |   synfuels-corporation-cutback = n: republican (145.7) 
     
    20892091    :: 
    20902092 
    2091         <xmp class="printout">physician-fee-freeze = n: democrat (253.4/5.9) 
     2093        physician-fee-freeze = n: democrat (253.4/5.9) 
    20922094        physician-fee-freeze = y: 
    20932095        |   synfuels-corporation-cutback = n: republican (145.7/6.2) 
     
    21062108 
    21072109    """ 
    2108     c45_printTree0(tree.tree, tree.classVar, 0) 
     2110    _c45_printTree0(tree.tree, tree.classVar, 0) 
    21092111 
    21102112 
  • orange/orngC45.py

    r7359 r7414  
    1 from Orange.classification.tree import c45_printTree as printTree 
     1from Orange.classification.tree import printTreeC45 as printTree 
Note: See TracChangeset for help on using the changeset viewer.