Changeset 8904:6efdf926602a in orange


Ignore:
Timestamp:
09/05/11 12:16:26 (3 years ago)
Author:
jzbontar <jure.zbontar@…>
Branch:
default
Convert:
1aaa35733150be9686c02dc4f7f1e6437260104d
Message:

SimpleTree documentation

Location:
orange
Files:
2 edited

Legend:

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

    r8772 r8904  
    15511551.. class:: SimpleTreeLearner 
    15521552 
    1553     .. attribute:: maxMajority 
     1553    .. attribute:: max_majority 
    15541554 
    15551555        Maximal proportion of majority class. When this is exceeded, 
    15561556        induction stops. 
    15571557 
    1558     .. attribute:: minExamples 
    1559  
    1560         Minimal number of examples in leaves. Subsets with less than 
    1561         ``minExamples`` examples are not split any further. Example count 
    1562         is weighed. 
    1563  
    1564     .. attribute:: maxDepth 
     1558    .. attribute:: min_instances 
     1559 
     1560        Minimal number of instances in leaves. Instance count is weighed. 
     1561 
     1562    .. attribute:: max_depth 
    15651563 
    15661564        Maximal depth of tree. 
    15671565 
    1568     .. attribute:: skipProb 
     1566    .. attribute:: skip_prob 
    15691567         
    1570         At every split an attribute will be skipped with probability ``skipProb``. 
     1568        At every split an attribute will be skipped with probability ``skip_prob``. 
    15711569        Useful for building random forests. 
    15721570         
     
    15761574:obj:`SimpleTreeLearner` is used in much the same way as :obj:`TreeLearner`. 
    15771575A typical example of using :obj:`SimpleTreeLearner` would be to build a random 
    1578 forest (uses`iris.tab`_): 
     1576forest (uses `iris.tab`_): 
    15791577 
    15801578.. literalinclude:: code/simple_tree_random_forest.py 
  • orange/doc/Orange/rst/code/simple_tree_random_forest.py

    r8773 r8904  
    1616 
    1717#ordinary random forests 
    18 tree = Orange.classification.tree.TreeLearner(minExamples=5, measure="gainRatio") 
     18tree = Orange.classification.tree.TreeLearner(min_instances=5, measure="gainRatio") 
    1919rf_def = Orange.ensemble.forest.RandomForestLearner(trees=50, base_learner=tree, name="for_gain") 
    2020 
    2121#random forests with simple trees - simple trees do random attribute selection by themselves 
    22 st = Orange.classification.tree.SimpleTreeLearner(min_examples=5) 
     22st = Orange.classification.tree.SimpleTreeLearner(min_instances=5) 
    2323stp = SimpleTreeLearnerSetProb(st) 
    2424rf_simple = Orange.ensemble.forest.RandomForestLearner(learner=stp, trees=50, name="for_simp") 
Note: See TracChangeset for help on using the changeset viewer.