Ignore:
Timestamp:
02/28/11 13:12:47 (3 years ago)
Author:
markotoplak
Branch:
default
Convert:
f7c8320a54b9bfb6a744524bbea26b913f1df33c
Message:

Tree documentation update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/doc/Orange/rst/code/treelearner.py

    r7474 r7713  
    88 
    99data = Orange.data.Table("lenses") 
    10 learner = Orange.classification.tree.TreeLearnerBase() 
     10learner = Orange.classification.tree.TreeLearner() 
    1111 
    1212def printTree0(node, level): 
     
    3535        raise TypeError, "invalid parameter" 
    3636 
    37 print learner.split 
    38 learner(data) 
    39 print learner.split 
    40  
    4137learner.stop = Orange.classification.tree.StopCriteria_common() 
    4238print learner.stop.maxMajority, learner.stop.minExamples 
     
    4541learner.stop.minExamples = 5.0 
    4642tree = learner(data) 
    47 Orange.classification.tree.printTree(tree) 
     43print tree.dump() 
    4844 
    4945print "\n\nTree with maxMajority = 0.5" 
    5046learner.stop.maxMajority = 0.5 
    5147tree = learner(data) 
    52 Orange.classification.tree.printTree(tree) 
     48print tree.dump() 
Note: See TracChangeset for help on using the changeset viewer.