Changeset 9181:913a180fed4f in orange


Ignore:
Timestamp:
11/08/11 21:11:38 (2 years ago)
Author:
markotoplak
Branch:
default
Convert:
38a351f5f11f240f95013a8a978217f97493a4f2
Message:

Classification tree documentation updates. Fixes #986.

Location:
orange
Files:
2 edited

Legend:

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

    r9164 r9181  
    99Classification trees (``tree``) 
    1010******************************* 
     11 
     12Orange includes multiple implementations of classification tree learners: 
     13a very flexible :class:`TreeLearner`, a fast :class:`SimpleTreeLearner`, 
     14and a :class:`C45Learner`, which uses the C4.5 tree induction 
     15algorithm. 
    1116 
    1217The following code builds a :obj:`TreeClassifier` on the Iris data set 
     
    138143* For null nodes (a node to which no learning instances were classified), 
    139144  it just prints "<null node>". 
    140 * For internal nodes, it print a node description: 
     145* For internal nodes, it prints a node description: 
    141146  the feature's name and distribution of classes. :obj:`Node`'s 
    142147  branch description is an :obj:`~Orange.classification.Classifier`, 
     
    272277.. class:: SplitConstructor 
    273278 
    274     Decide how to divide learning instances. 
     279    Decide how to divide learning instances, ie. define branching criteria. 
    275280     
    276281    The :obj:`SplitConstructor` should use the domain 
    277     contingency when possible, both for speed and adaptability 
    278     (:obj:`TreeLearner.contingency`).  Sometimes domain contingency does 
     282    contingency when possible, both for speed and adaptability.  
     283    Sometimes domain contingency does 
    279284    not suffice, for example if ReliefF score is used. 
    280285 
     
    375380    with a single feature value are described with that value and 
    376381    branches with more than one are described with ``[<val1>, <val2>, 
    377     ...<valn>]``. Only binary features are marked as spent. 
     382    ..., <valn>]``. Only binary features are marked as spent. 
    378383 
    379384.. class:: SplitConstructor_Threshold 
     
    472477Splitters sort learning instances into branches (the branches are selected 
    473478with a :obj:`SplitConstructor`, while a :obj:`Descender` decides the 
    474 branch for an instance during classification. 
     479branch for an instance during classification). 
    475480 
    476481Most splitters call :obj:`Node.branch_selector` and assign 
     
    14211426    nothing, you are running C4.5. 
    14221427 
     1428    Constructs a :obj:`C45Classifier` when given data. 
     1429 
    14231430    .. attribute:: gain_ratio (g) 
    14241431         
     
    15211528class C45Classifier(Orange.classification.Classifier): 
    15221529    """ 
    1523     A faithful reimplementation of Quinlan's function from C4.5, but 
     1530    A faithful reimplementation of Quinlan's C4.5, but 
    15241531    uses a tree composed of :class:`C45Node` instead of C4.5's original 
    15251532    tree structure. 
     
    16571664    **The tree induction process** 
    16581665 
    1659     #. The learning instances are copied to a table, unless 
    1660        :obj:`store_instances` is `False` and they already are in table. 
     1666    #. The learning instances are copied, unless 
     1667       :obj:`store_instances` is `False` and the instance 
     1668       already are stored in a :obj:`~Orange.data.Table`. 
    16611669    #. Apriori class probabilities are computed. A list of 
    16621670       candidate features for the split is compiled; in the beginning, 
     
    25862594 
    25872595        :arg leaf_str: The format string for the tree leaves. If  
    2588           left empty, "%V (%^.2m%)" will be used for classification trees 
    2589           and "%V" for regression trees. 
     2596          left empty, ``"%V (%^.2m%)"`` will be used for classification trees 
     2597          and ``"%V"`` for regression trees. 
    25902598        :type leaf_str: string 
    25912599        :arg node_str: The format string for the internal nodes. 
  • orange/doc/Orange/rst/SimpleTreeLearner.txt

    r9164 r9181  
    11:obj:`SimpleTreeLearner` is an implementation of regression and classification 
    22trees. It is faster than :obj:`TreeLearner` at the expense of flexibility. 
    3 It uses gain ratio for classification and mse for regression. 
     3It uses gain ratio for classification and MSE for regression. 
    44 
    55:obj:`SimpleTreeLearner` was developed for speeding up the construction 
Note: See TracChangeset for help on using the changeset viewer.