Changeset 9032:6945618a9e22 in orange


Ignore:
Timestamp:
09/27/11 15:24:07 (3 years ago)
Author:
markotoplak
Branch:
default
Convert:
c30cbadecc4431e0f8248a69fd08db8b276ffc53
Message:

Updates to Orange.classification.Tree documentation.

File:
1 edited

Legend:

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

    r9024 r9032  
    161161should be aware of possible alternatives. 
    162162 
    163 If the print-out function needs to accept either a 
    164 :obj:`TreeClassifier` or a :obj:`Node`, it can be written as follows: 
     163The print-out function that accepts either a 
     164:obj:`TreeClassifier` or a :obj:`Node` can be written as follows: 
    165165 
    166166.. literalinclude:: code/treestructure.py 
     
    787787 
    788788 
    789 The printout can be custumized with the format string, which is printed 
    790 out at every leaf or internal node with the certain format specifiers 
    791 replaced by data from the tree node. Specifiers are generally of form 
    792 **%[^]<precision><quantity><divisor>**. 
     789Format string 
     790------------- 
     791 
     792Format strings are printed at every leaf or internal node with the certain 
     793format specifiers replaced by data from the tree node. Specifiers are 
     794generally of form **%[^]<precision><quantity><divisor>**. 
    793795 
    794796**^** at the start tells that the number should be multiplied by 100, 
     
    812814a dot is printed out instead. 
    813815 
    814 **<quantity>** is the only required element. It defines what to print. 
    815 For instance, ``%N`` would print out the number of instances in the node. 
    816 Possible quantities are 
     816**<quantity>** defines what to print and is the only required element.  
     817It can be: 
    817818 
    818819``V`` 
    819     The value predicted at that node. You cannot define the precision  
    820     or divisor here. 
     820    The predicted value at that node. Precision  
     821    or divisor can not be defined here. 
    821822 
    822823``N`` 
     
    835836 
    836837``E`` 
    837     Standard error for class of instances in the node; available for 
     838    Standard error for class of instances in the node; available only for 
    838839    regression trees. 
    839840 
     
    843844 
    844845``C`` 
    845     The number of instances in the given class. For classification trees,  
    846     this modifier is used as, for instance in, ``%5.3C="Iris-virginica"bP``  
    847     - this will tell the number of instances of Iris-virginica by the  
    848     number of instances this class in the parent node. If you are  
    849     interested in instances that are *not* Iris-virginica, say 
    850     ``%5.3CbP!="Iris-virginica"`` 
    851  
    852     For regression trees, you can use operators =, !=, <, <=, >, and >=,  
    853     as in ``%C<22`` - add the precision and divisor if you will. You 
    854     can also check the number of instances in a certain interval: 
    855     ``%C[20, 22]`` will give you the number of instances between 20 
    856     and 22 (inclusive) and ``%C(20, 22)`` will give the number of 
    857     such instances excluding the boundaries. You can of course mix the 
    858     parentheses, e.g. ``%C(20, 22]``.  If you would like the instances 
    859     outside the interval, add a ``!``, like ``%C!(20, 22]``. 
     846    The number of instances in the given class.  For a classification 
     847    example, ``%5.3C="Iris-virginica"bP`` denotes the number of instances 
     848    of Iris-virginica by the number of instances this class in the parent 
     849    node ( instances that are *not* Iris-virginica could be described with 
     850    ``%5.3CbP!="Iris-virginica"``). 
     851 
     852    For regression trees, use operators =, !=, <, <=, >, and >=, as in 
     853    ``%C<22``, with optional precision and divisor. Intervals are also 
     854    possible: ``%C[20, 22]`` gives the number of instances between 
     855    20 and 22 (inclusive) and ``%C(20, 22)`` gives the number of such 
     856    instances excluding the boundaries. Mixing of parentheses is allowed, 
     857    e.g. ``%C(20, 22]``.  Add ``!`` for instances outside the interval, 
     858    like ``%C!(20, 22]``. 
    860859 
    861860``c`` 
     
    864863 
    865864``D`` 
    866     Prints out the number of instances in each class. You can use both, 
    867     precision (it is applied to each number in the distribution) or the 
    868     divisor. This quantity cannot be computed for regression trees. 
     865    The number of instances in each class. Precision and the divisor 
     866    are applied to each number in the distribution.  This quantity can 
     867    not be computed for regression trees. 
    869868 
    870869``d`` 
    871     Same as above, except that it shows proportions of instances. This 
    872     again doesn't work with regression trees. 
     870    Same as ``D``, except that it shows proportions of instances. 
    873871 
    874872<user defined formats> 
    875     You can add more, if you will. Instructions and instances are given at 
    876     the end of this section. 
    877  
    878 .. rubric:: Examples 
    879  
    880 We shall build a small tree from the iris data set - we shall limit the 
    881 depth to three levels: 
    882  
     873    Instructions and examples of added formats are at the end of this 
     874    section. 
     875 
     876.. rubric:: Examples on classification trees 
     877 
     878A tree on the iris data set with the depth limited to three 
     879levels is built as follows: 
     880     
    883881.. literalinclude:: code/orngTree1.py 
    884882   :lines: 1-4 
     
    886884.. _orngTree1.py: code/orngTree1.py 
    887885 
    888 Let's now print out the predicted class at each node, the number 
     886Printing the predicted class at each node, the number 
    889887of instances in the majority class with the total number of instances in 
    890 the node:: 
     888the node requires a custom format string:: 
    891889 
    892890    >>> print tree.dump(leaf_str="%V (%M out of %N)") 
     
    900898    |    |    petal length>=4.850: Iris-virginica (43.000 out of 43.000) 
    901899 
    902 Would you like to know how the number of instances declines as 
    903 compared to the entire data set and to the parent node? We find it 
    904 with this:: 
     900The number of instances as 
     901compared to the entire data set and to the parent node:: 
    905902 
    906903    >>> print tree.dump(leaf_str="%V (%^MbA%, %^MbP%)") 
     
    914911    |    |    petal length>=4.850: Iris-virginica (86%, 96%) 
    915912 
    916 Let us first read the format string. ``%M`` is the number of  
    917 instances in the majority class. We want it divided by the number of 
    918 all instances from this class on the entire data set, hence ``%MbA``. 
    919 To have it multipied by 100, we say ``%^MbA``. The percent sign 
    920 *after* that is just printed out literally, just as the comma and 
    921 parentheses (see the output). The string for showing the proportion 
    922 of this class in the parent is the same except that we have ``bP`` 
    923 instead of ``bA``. 
    924  
    925 And now for the output: all instances of setosa for into the first node. 
    926 For versicolor, we have 98% in one node; the rest is certainly 
    927 not in the neighbouring node (petal length>=5.350) since all versicolors 
    928 from the node petal width<1.750 went to petal length<5.350 (we know 
    929 this from the 100% in that line). Virginica is the majority class in 
    930 the three nodes that together contain 94% of this class (4+4+86). The 
    931 rest must had gone to the same node as versicolor. 
    932  
    933 If you find this guesswork annoying - so do I. Let us print out the 
     913``%M`` is the number of instances in the majority class. Dividing by 
     914the number of all instances from this class on the entire data set 
     915is described with ``%MbA``. Add ``^`` in front for mutiplication with 
     916100. The percent sign *after* that is printed out literally, just as the 
     917comma and parentheses. For the proportion of this class in the parent the 
     918``bA`` is replaced with ``bA``. 
     919 
     920To print the 
    934921number of versicolors in each node, together with the proportion of 
    935922versicolors among the instances in this particular node and among all 
    936 versicolors. So, 
    937  
    938 :: 
     923versicolors use the following format string:: 
    939924 
    940925    '%C="Iris-versicolor" (%^c="Iris-versicolor"% of node, %^CbA="Iris-versicolor"% of versicolors) 
    941926 
    942 gives the following output:: 
     927It gives the following output:: 
    943928 
    944929    petal width<0.800: 0.000 (0% of node, 0% of versicolors) 
     
    951936    |    |    petal length>=4.850: 0.000 (0% of node, 0% of versicolors) 
    952937 
    953 Finally, we may want to print out the distributions, using a simple  
    954 string ``%D``:: 
     938Finally, to print the distributions using a format string ``%D``:: 
    955939 
    956940    petal width<0.800: [50.000, 0.000, 0.000] 
     
    963947    |    |    petal length>=4.850: [0.000, 0.000, 43.000] 
    964948 
    965 What is the order of numbers here? If you check  
    966 ``data.domain.class_var.values`` , you'll learn that the order is setosa,  
    967 versicolor, virginica; so in the node at peta length<5.350 we have 49 
    968 versicolors and 3 virginicae. To print out the proportions, we can 
    969 ``%.2d`` - this gives us proportions within node, rounded on two 
    970 decimals:: 
     949As the order of classes is the same as in ``data.domain.class_var.values`` 
     950(setosa, versicolor, virginica), there are 49 versicolors and 3 virginicae 
     951in the node at ``petal length<5.350``. To print the proportions within 
     952nodes rounded to two decimals use ``%.2d``:: 
    971953 
    972954    petal width<0.800: [1.00, 0.00, 0.00] 
     
    979961    |    |    petal length>=4.850: [0.00, 0.00, 1.00] 
    980962 
    981 We haven't tried printing out any information for internal nodes. 
    982 To start with the most trivial case, we shall print the prediction at 
    983 each node. 
     963The most trivial format string for internal nodes is to for printing 
     964the prediction at each node. ``.`` in the following example specifies 
     965that the node_str should be the same as leaf_str. 
    984966 
    985967:: 
    986968 
    987969    tree.dump(leaf_str="%V", node_str=".") 
    988      
    989 says that the node_str should be the same as leaf_str (not very useful  
    990 here, since leaf_str is trivial anyway). 
    991  
    992 ::  
     970  
     971The output:: 
    993972 
    994973    root: Iris-setosa 
     
    1002981    |    |    |    petal length>=4.850: Iris-virginica 
    1003982 
    1004 Note that the output is somewhat different now: there appeared another 
    1005 node called *root* and the tree looks one level deeper. This is needed 
    1006 to print out the data for that node to. 
    1007  
    1008 Now for something more complicated: let us observe how the number 
    1009 of virginicas decreases down the tree:: 
     983There appeared a node called *root* and the tree looks one level 
     984deeper. This is needed to print out the data for that node to. 
     985 
     986To observe how the number 
     987of virginicas decreases down the tree use:: 
    1010988 
    1011989    print tree.dump(leaf_str='%^.1CbA="Iris-virginica"% (%^.1CbP="Iris-virginica"%)', node_str='.') 
    1012990 
    1013 Let's first interpret the format string: ``CbA="Iris-virginica"`` is  
    1014 the number of instances from class virginica, divided by the total number 
     991The interpretation: ``CbA="Iris-virginica"`` is  
     992the number of instances from virginica, divided by the total number 
    1015993of instances in this class. Add ``^.1`` and the result will be 
    1016994multiplied and printed with one decimal. The trailing ``%`` is printed 
    1017995out. In parentheses we print the same thing except that we divide by 
    1018996the instances in the parent node. Note the use of single quotes, so we 
    1019 can use the double quotes inside the string, when we specify the class. 
     997can use the double quotes inside the string to specify the class. 
    1020998 
    1021999:: 
     
    10311009    |    |    |    petal length>=4.850: 86.0% (95.6%) 
    10321010 
    1033 See what's in the parentheses in the root node? If :meth:`~TreeClassifier.dump` 
    1034 cannot compute something (in this case it's because the root has no parent), 
    1035 it prints out a dot. You can also eplace ``=`` by ``!=`` and it 
    1036 will count all classes *except* virginica. 
    1037  
    1038 For one final instance with classification trees, we shall print the 
    1039 distributions in that nodes, the distribution compared to the parent 
    1040 and the proportions compared to the parent (the latter things are not 
    1041 the same - think why). In the leaves we shall also add the predicted 
    1042 class. So now we'll have to call the function like this. 
    1043  
    1044 :: 
     1011If :meth:`~TreeClassifier.dump` cannot compute something, in this case 
     1012because the root has no parent, it prints out a dot. 
     1013 
     1014For the final example with classification trees, we shall print the 
     1015distributions in nodes, the distribution compared to the parent and the 
     1016proportions compared to the parent.  In the leaves we shall also add 
     1017the predicted class:: 
    10451018 
    10461019    >>> print tree.dump(leaf_str='"%V   %D %.2DbP %.2dbP"', node_str='"%D %.2DbP %.2dbP"') 
     
    10601033    |    |    |        Iris-virginica   [0.000, 0.000, 43.000] [0.00, 0.00, 0.96] [0.00, 0.00, 1.02] 
    10611034 
    1062 To explore the possibilities when printing regression trees, we are going  
    1063 to induce a tree from the housing data set. Called with the tree as the 
    1064 only argument, :meth:`TreeClassifier.dump` prints the tree like this:: 
     1035 
     1036.. rubric:: Examples on regression trees 
     1037 
     1038The regression trees examples use a tree 
     1039induced from the housing data set. Without other argumets,  
     1040:meth:`TreeClassifier.dump` prints the following:: 
    10651041 
    10661042    RM<6.941 
     
    10791055    |    |    TAX>=534.500: 21.9 
    10801056 
    1081 Let us add the standard error in both internal nodes and leaves, and 
    1082 the 90% confidence intervals in the leaves:: 
     1057To add the standard error in both internal nodes and leaves, and 
     1058the 90% confidence intervals in the leaves, use:: 
    10831059 
    10841060    >>> print tree.dump(leaf_str="[SE: %E]\t %V %I(90)", node_str="[SE: %E]") 
     
    11071083    |    |    |        [SE: 0.000]   21.9 [21.900-21.900] 
    11081084 
    1109 What's the difference between ``%V``, the predicted value and  
    1110 ``%A`` the average? Doesn't a regression tree always predict the 
    1111 leaf average anyway? Not necessarily, the tree predict whatever the 
    1112 :obj:`~Node.node_classifier` in a leaf returns.  
     1085The predicted value (``%V``) and the average (``%A``) may 
     1086differ becase a regression tree does not always predict the 
     1087leaf average, but whatever the 
     1088:obj:`~Node.node_classifier` in a leaf returns. 
    11131089As ``%V`` uses the :obj:`Orange.data.variable.Continuous`' function 
    1114 for printing out the value, therefore the printed number has the same 
     1090for printing out the value, the number has the same 
    11151091number of decimals as in the data file. 
    11161092 
     
    11181094as classification trees. They instead offer a set of operators for 
    11191095observing the number of instances within a certain range. For instance, 
    1120 let us check the number of instances with values below 22, and compare 
    1121 this number with values in the parent nodes:: 
     1096to print the number of instances with values below 22 and compare 
     1097it with values in the parent nodes use:: 
    11221098 
    11231099    >>> print tree.dump(leaf_str="%C<22 (%cbP<22)", node_str=".") 
     
    11421118the number of such instances in its parent node. 
    11431119 
    1144 For another exercise, let's count the same for all instances *outside* 
    1145 interval [20, 22] (given like this, the interval includes the bounds). 
    1146 And let us print out the proportions as percents. 
    1147  
    1148 :: 
     1120To count the same for all instances *outside* 
     1121interval [20, 22] and print out the proportions as percents use:: 
    11491122 
    11501123    >>> print tree.dump(leaf_str="%C![20,22] (%^cbP![20,22]%)", node_str=".") 
    11511124 
    1152 OK, let's observe the format string for one last time. ``%c![20, 22]``  
    1153 would be the proportion of instances (within the node) whose values 
    1154 are below 20 or above 22. By ``%cbP![20, 22]`` we derive this by 
    1155 the same statistics computed on the parent. Add a ``^`` and you have 
    1156 the percentages. 
     1125The format string ``%c![20, 22]``  
     1126denotes the proportion of instances (within the node) whose values 
     1127are below 20 or above 22. ``%cbP![20, 22]`` derives  
     1128same statistics computed on the parent. A ``^`` is added for  
     1129percentages. 
    11571130 
    11581131:: 
     
    11751148 
    11761149 
    1177 Defining Your Own Printout functions 
    1178 ------------------------------------ 
    1179  
    1180 :meth:`TreeClassifier.dump`'s argument :obj:`user_formats` can be used to print out 
    1181 some other information in the leaves or nodes. If provided, 
    1182 :obj:`user_formats` should contain a list of tuples with a regular 
    1183 expression and a callback function to be called when that expression 
     1150Defining custom printouts 
     1151------------------------- 
     1152 
     1153:meth:`TreeClassifier.dump`'s argument :obj:`user_formats` 
     1154can be used to print out some other information. 
     1155:obj:`~TreeClassifier.dump.user_formats` should contain a list of tuples 
     1156with a regular expression and a function to be called when that expression 
    11841157is found in the format string. Expressions from :obj:`user_formats` 
    1185 are checked before the built-in expressions discussed above, so you can 
    1186 override the built-ins if you want to. 
    1187  
    1188 The regular expression should describe a string like those we used above, 
    1189 for instance the string ``%.2DbP``. When a leaf or internal node 
    1190 is printed out, the format string (:obj:`leaf_str` or :obj:`node_str`) 
     1158are checked before the built-in expressions discussed above. 
     1159 
     1160The regular expression should describe a string like were used above, 
     1161for instance ``%.2DbP``. When a leaf or internal node 
     1162is printed, the format string (:obj:`leaf_str` or :obj:`node_str`) 
    11911163is checked for these regular expressions and when the match is found, 
    11921164the corresponding callback function is called. 
    11931165 
    1194 The callback function will get five arguments: the format string  
     1166The passed function will get five arguments: the format string  
    11951167(:obj:`leaf_str` or :obj:`node_str`), the match object, the node which is 
    11961168being printed, its parent (can be None) and the tree classifier. 
     
    12101182.. autofunction:: by_whom 
    12111183 
    1212  
    1213 There are also a few pieces of regular expression that you may want to reuse.  
    1214 The two you are likely to use are: 
     1184The module also includes reusable regular expressions:  
    12151185 
    12161186.. autodata:: fs 
     
    12181188.. autodata:: by 
    12191189 
    1220 For a trivial example, ``%V`` is implemented like this. There is the 
    1221 following tuple in the list of built-in formats:: 
     1190For a trivial example, ``%V`` is implemented with the 
     1191following tuple:: 
    12221192 
    12231193    (re.compile("%V"), replaceV) 
    12241194 
    1225 :obj:`replaceV` is a function defined by:: 
     1195And ``replaceV`` is defined by:: 
    12261196 
    12271197    def replaceV(strg, mo, node, parent, tree): 
     
    12301200It therefore takes the value predicted at the node 
    12311201(``node.node_classifier.default_value`` ), converts it to a string 
    1232 and passes it to *insert_str* to do the replacement. 
     1202and passes it to :func:`insert_str`. 
    12331203 
    12341204A more complex regular expression is the one for the proportion of 
    12351205majority class, defined as ``"%"+fs+"M"+by``. It uses the two partial 
    1236 expressions defined above. 
    1237  
    1238 Let's say with like to print the classification margin for each node, 
     1206expressions defined above (:obj:`fs` and :obj:`by`). 
     1207 
     1208The following code prints the classification margin for each node, 
    12391209that is, the difference between the proportion of the largest and the 
    12401210second largest class in the node: 
     
    12451215   :lines: 7-31 
    12461216 
    1247 ``get_margin`` gets the distribution and computes the margin. The callback 
    1248 replaces, ``replaceB``, computes the margin for the node.  If :data:`by` 
     1217``get_margin`` computes the margin from the distribution. The replacing 
     1218function, ``replaceB``, computes the margin for the node.  If :data:`by` 
    12491219group is present, we call :func:`by_whom` to get the node with whose 
    12501220margin this node's margin is to be divided. If this node (usually the 
    12511221parent) does not exist of if its margin is zero, :func:`insert_dot` 
    1252 inserts dot, otherwise :func:`insert_num` is called which insert the 
     1222inserts dot, otherwise :func:`insert_num` is called which inserts the 
    12531223number in the user-specified format.  ``my_format`` contains the regular 
    12541224expression and the callback function. 
    12551225 
    1256 We can now print out the iris tree: 
     1226Printing the tree with 
    12571227 
    12581228.. literalinclude:: code/orngTree2.py 
    12591229    :lines: 33 
    12601230 
    1261 And we get:: 
     1231yields:: 
    12621232 
    12631233    petal width<0.800: Iris-setosa 100% (100.00%) 
     
    12701240    |    |    petal length>=4.850: Iris-virginica 100% (104.55%) 
    12711241 
    1272 Plotting the Tree using Dot 
     1242Plotting with Dot 
    12731243--------------------------- 
    12741244 
    1275 Suppose you saved the tree in a file "tree5.dot". You can then 
    1276 print it out as a gif if you execute the following command line 
    1277  
    1278 :: 
    1279      
     1245To produce images of trees, first create a .dot file with 
     1246:meth:`TreeClassifier.dot`. If it was saved to "tree5.dot", plot a gif 
     1247with the following command:: 
     1248 
    12801249    dot -Tgif tree5.dot -otree5.gif 
    12811250 
    1282 GraphViz's dot has quite a few other output formats, check  
    1283 its documentation to learn which. 
    1284  
     1251Check GraphViz's dot documentation for more options and 
     1252output formats. 
    12851253 
    12861254 
     
    17811749    instead. Attributes can be also be set on initialization. 
    17821750 
    1783     **The tree building process** 
    1784  
    1785     #. The learning instances are stored in a table, 
    1786        because the algorithm works with pointers to instances. If instances 
    1787        are in a file or are fed through a filter, they are copied to a 
    1788        table. Even if they are already in a table, they are copied if 
    1789        :obj:`store_instances` is `True`. 
     1751    **The tree induction process** 
     1752 
     1753    #. The learning instances are copied to a table, unless 
     1754       :obj:`store_instances` is `False`  and they already are in table. 
    17901755    #. Apriori class probabilities are computed. If the sum 
    1791        of instance weights is zero, there are no instances so the process 
    1792        stops. A list of candidate attributes for the split is compiled; 
    1793        in the beginning, all attributes are candidates. 
     1756       of instance weights is zero, the process stops. A list of 
     1757       candidate features for the split is compiled; in the beginning, 
     1758       all attributes are candidates. 
    17941759    #. The recursive part. Its 
    17951760       arguments are a set of instances, a weight meta-attribute ID 
    1796        (it can be always the same as the original or can change to 
     1761       (it can change to 
    17971762       accomodate splitting of instances among branches), apriori class 
    1798        distribution and a list of candidates (represented as a vector 
    1799        of Boolean values). 
     1763       distribution and a list of candidates (as a vector 
     1764       of booleans). 
    18001765    #. The contingency matrix is computed.   
    18011766    #. A :obj:`stop` is called 
    1802        to see whether it is worth to continue. If not, a 
    1803        :obj:`~Node.node_classifier` is built and the :obj:`Node` is 
    1804        returned. Otherwise, a :obj:`~Node.node_classifier` is only built if 
    1805        :obj:`store_node_classifier` is `True`.  The :obj:`~Node.node_classifier` 
    1806        is build by calling :obj:`node_learner`'s :obj:`smart_learn` 
    1807        function with the given instances, weight ID and the just computed 
    1808        matrix. If the learner can use the matrix (and the default, 
    1809        :obj:`~Orange.classification.majority.MajorityLearner`, can), it 
    1810        won't touch the instances. Therefore a :obj:`contingency_computer` 
    1811        will, in many cases, affect the :obj:`~Node.node_classifier`. The 
    1812        :obj:`node_learner` can return no classifier; if so and 
    1813        if the classifier would be needed for classification, the 
    1814        :obj:`TreeClassifier`'s function returns DK or an empty 
    1815        distribution. 
    1816     #. If the induction is to continue, a :obj:`split` is called. 
     1767       to check whether to continue. If not, a 
     1768       :obj:`~Node.node_classifier` is built and the :obj:`Node` 
     1769       is returned. A :obj:`~Node.node_classifier` is also built 
     1770       for internal nodes if :obj:`store_node_classifier` is 
     1771       `True`.  The :obj:`~Node.node_classifier` is build by calling 
     1772       :obj:`node_learner`'s :obj:`smart_learn` function with the given 
     1773       instances, weight ID and the contingency matrix. As the learner 
     1774       uses contingencies whenever possible, a :obj:`contingency_computer` 
     1775       will often affect the :obj:`~Node.node_classifier`. If 
     1776       :obj:`node_learner` does not return a classifier and the classifier 
     1777       would be needed for classification, the :obj:`TreeClassifier`'s 
     1778       function returns DK or an empty distribution. 
     1779    #. If the induction continues continue, a :obj:`split` is called. 
    18171780       If it fails to return a branch selector, induction stops and the 
    18181781       :obj:`Node` is returned. 
    1819     #. Instances are divided (into child nodes) with :obj:`splitter`. 
    1820     #. The contingency gets removed if :obj:`store_contingencies` is 
    1821        `False`.  Thus, :obj:`split`, :obj:`stop` and :obj:`splitter` 
    1822        can use the contingency matrices. 
     1782    #. Instances are divided into child nodes with :obj:`splitter`. 
     1783    #. The contingency is removed if :obj:`store_contingencies` is 
     1784       `False`. Thus, :obj:`split`, :obj:`stop` and :obj:`splitter` 
     1785       were able to use the contingency matrices. 
    18231786    #. The object recursively calls itself (see step 3) for each of 
    1824        the non-empty subsets. If the splitter returnes a list of weights, 
    1825        a corresponding weight is used for each branch. The attribute spent 
    1826        by the splitter (if any) is removed from the list of candidates 
     1787       the non-empty subsets. If the splitter returned weights, 
     1788       they are used for each branch. The feature spent 
     1789       (if any) is removed from the candidate list 
    18271790       for the subtree. 
    1828     #. A subset of instances is stored in its corresponding tree node, 
     1791    #. Instances are stored in the corresponding node, 
    18291792       if :obj:`store_instances` is `True`. If not, the new weight 
    1830        attributes are removed (if any were created). 
     1793       attributes that were created are removed. 
    18311794 
    18321795    **Attributes** 
     
    18341797    .. attribute:: node_learner 
    18351798 
    1836         Induces a classifier from instances in a node, both 
    1837         used for internal nodes and leaves. The default is 
     1799        Induces a classifier from instances in a node. It is used both 
     1800        for internal nodes and leaves. The default is 
    18381801        :obj:`Orange.classification.majority.MajorityLearner`. 
    18391802 
Note: See TracChangeset for help on using the changeset viewer.