Changeset 8772:230938496046 in orange


Ignore:
Timestamp:
08/25/11 09:47:26 (3 years ago)
Author:
jzbontar <jure.zbontar@…>
Branch:
default
Convert:
405237b97c1e7878a602788cba8ea02590dcdb57
Message:

Added SimpleTreeLearner and basic documentation to Orange

File:
1 edited

Legend:

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

    r8738 r8772  
    15381538case when only a single value goes into the branch. 
    15391539 
     1540================= 
     1541SimpleTreeLearner 
     1542================= 
     1543 
     1544:obj:`SimpleTreeLearner` is an implementation of regression and classification 
     1545trees. It is faster than :obj:`TreeLearner` at the expense of flexibility. 
     1546It uses gain ratio for classification and mse for regression. 
     1547 
     1548:obj:`SimpleTreeLearner` was developed for speeding up the construction 
     1549of random forests, but can also be used as a standalone tree. 
     1550 
     1551.. class:: SimpleTreeLearner 
     1552 
     1553    .. attribute:: maxMajority 
     1554 
     1555        Maximal proportion of majority class. When this is exceeded, 
     1556        induction stops. 
     1557 
     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 
     1565 
     1566        Maximal depth of tree. 
     1567 
     1568    .. attribute:: skipProb 
     1569         
     1570        At every split an attribute will be skipped with probability ``skipProb``. 
     1571        Useful for building random forests. 
     1572         
     1573Examples 
     1574======== 
     1575 
     1576:obj:`SimpleTreeLearner` is used in much the same way as :obj:`TreeLearner`. 
     1577A typical example of using :obj:`SimpleTreeLearner` would be to build a random 
     1578forest (uses`iris.tab`_): 
     1579 
     1580.. literalinclude:: code/simple_tree_random_forest.py 
     1581 
     1582 
    15401583References 
    15411584========== 
     
    15621605     TreeLearner as _TreeLearner, \ 
    15631606         TreeClassifier as _TreeClassifier, \ 
     1607         SimpleTreeLearner, \ 
     1608         SimpleTreeClassifier, \ 
    15641609         C45Learner as _C45Learner, \ 
    15651610         C45Classifier as _C45Classifier, \ 
Note: See TracChangeset for help on using the changeset viewer.