Changeset 9076:0d1a27d3d5d8 in orange


Ignore:
Timestamp:
10/07/11 13:36:07 (3 years ago)
Author:
markotoplak
Branch:
default
Convert:
a91b70ac824f3df3594befb02a1cecda8fca4004
Message:

updates to Orange.classification.tree

File:
1 edited

Legend:

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

    r9073 r9076  
    639639        do split instances differ in returned vote weights. 
    640640 
    641 .. class:: Descender_UnknownsToNode 
     641.. class:: Descender_UnknownToNode 
    642642 
    643643    Bases: :obj:`Descender` 
     
    649649    creating node classifier or manually remove them after the induction). 
    650650 
    651 .. class:: Descender_UnknownsToBranch 
     651.. class:: Descender_UnknownToBranch 
    652652 
    653653    Bases: :obj:`Descender` 
     
    657657    :obj:`Splitter_UnknownsToBranch`. 
    658658 
    659 .. class:: Descender_UnknownsToCommonBranch 
     659.. class:: Descender_UnknownToCommonBranch 
    660660 
    661661    Bases: :obj:`Descender` 
     
    665665    random branch is chosen for each instance that is to be classified. 
    666666 
    667 .. class:: Descender_UnknownsToCommonSelector 
     667.. class:: Descender_UnknownToCommonSelector 
    668668 
    669669    Bases: :obj:`Descender` 
     
    672672    the highest recommendation by the selector. 
    673673 
    674 .. class:: Descender_MergeAsBranchSizes 
     674.. class:: Descender_UnknownMergeAsBranchSizes 
    675675 
    676676    Bases: :obj:`Descender` 
     
    679679    according to the sizes of the branches. 
    680680 
    681 .. class:: Descender_MergeAsSelector 
     681.. class:: Descender_UnknownMergeAsSelector 
    682682 
    683683    Bases: :obj:`Descender` 
     
    26042604    **The classification process** 
    26052605 
    2606     :obj:`TreeClassifier` uses the :obj:`descender` to descend from 
    2607     the root.  If it returns only a :obj:`Node` and no distribution, 
    2608     the descend should stop; it does not matter whether it's a leaf 
    2609     (the first case above) or an internal node (the second case). The 
    2610     node's :obj:`~Node.node_classifier` is used to decide the class. 
    2611  
    2612     If the descender returns a :obj:`Node` and a distribution, 
    2613     the :obj:`TreeClassifier` recursively calls itself for each of 
    2614     the subtrees and the predictions are weighted as requested by 
    2615     the descender. From now on, ``vote`` and ``class_distribution`` 
    2616     (private methods) interweave down the tree. 
    2617  
    2618     ``vote`` returns a normalized distribution  of predictions: for each 
    2619     node, it calls the  :obj:`class_distribution` and then multiplies 
    2620     and sums the distribution.  ``class_distribution`` gets an additional  
    2621     parameter, a default 
    2622     tree root.  If :obj:`descender` reaches a leaf, it calls 
    2623     :obj:`~Node.node_classifier`, otherwise it calls ``vote``. Thus, 
    2624     ``vote`` and ``class_distribution`` form a double recursion. The 
    2625     recursive calls only happen at nodes where a vote is needed (that is, 
    2626     at nodes where the descender halts). 
     2606    :obj:`TreeClassifier` uses the :obj:`descender` to descend the 
     2607    instance from the root. If the :obj:`descender` returns only a 
     2608    :obj:`Node` and no distribution, the descend should stop as the node 
     2609    was unambiguously selected. The node's :obj:`~Node.node_classifier` 
     2610    decides the class. 
     2611 
     2612    If the descender returns a :obj:`Node` and a distribution, as it 
     2613    happens, for example, if the instance's value for the :obj:`Node`'s 
     2614    feature is unknown, the same process repeats for all subtrees and 
     2615    their predictions are combined. 
    26272616 
    26282617    **Attributes** 
     
    26302619    .. attribute:: tree 
    26312620 
    2632         The root of the tree, represented as a :class:`Node`. 
     2621        The root of the tree, as a :class:`Node`. 
    26332622 
    26342623    .. attribute:: descender 
    26352624 
    2636         A :obj:`Descender`. It is used to descend an instance from the 
    2637         root of the tree (:obj:`tree`) as deeply as possible according 
    2638         to the instance's feature values. 
    2639  
    2640  
     2625        A :obj:`Descender` used to descend an instance from the root as 
     2626        deeply as possible according to the instance's feature values. 
    26412627    """ 
    26422628     
Note: See TracChangeset for help on using the changeset viewer.