source: orange/docs/widgets/rst/classify/classificationtreegraph.rst @ 11778:ecd4beec2099

Revision 11778:ecd4beec2099, 5.8 KB checked in by Ales Erjavec <ales.erjavec@…>, 5 months ago (diff)

Use new SVG icons in the widget documentation.

Line 
1.. _Classification Tree Graph:
2
3Classification Tree Graph
4=========================
5
6.. image:: ../../../../Orange/OrangeWidgets/Classify/icons/ClassificationTreeGraph.svg
7
8Visualization of classification tree.
9
10Signals
11-------
12
13Inputs:
14   - Classification Tree (TreeClassifier)
15      Classification tree.
16
17
18Outputs:
19   - Examples (ExampleTable)
20      Attribute-valued data set associated with a classification tree node
21      selected by the user.
22
23
24Description
25-----------
26
27This is a versatile widget with 2-D visualization of classification
28tree that allows user to alter the appearance of the tree and
29associate tree-based data to graphical elements of the
30visualization. In addition, user can select a node, instructing the
31widget to commit the data associated to the node to its output channel,
32thus in combination with other widget obtaining interesting schemas
33for explorative data analysis.
34
35.. image:: images/ClassificationTreeGraph-S.png
36   :alt: Classification Tree Graph
37
38General Tab
39-----------
40
41Several general parameters that affect the drawing size of the
42displayed tree may be set in the General tab. Here, user can set the
43zoom factor and define the vertical and horizontal spacing between the
44nodes. Node bubble information (like the one displayed in the snapshot
45above) may be turned off, and user may instruct the widget to truncate
46the text labels to fit provided space.
47
48Tree Tab
49--------
50
51.. image:: images/ClassificationTreeGraph-TreeTab.png
52   :alt: Classification Tree Graph - Tree Tab
53
54In this tab the user can define the depth to which the widget will
55display the tree (may be useful when very large trees are
56induced). The edges between the nodes in the tree graph are drawn
57according to the maximum width defined in this tab. All the edges will
58be of equal width if :obj:`No dependency` is chosen in the
59:obj:`Reference for Edge Width` box. When :obj:`Root node` is selected
60instead, the width of the edge will correspond to the proportion of
61instances in the corresponding node with respect to all the instances
62in the training data set (that is, instances in the root node). That
63is, under this selection, the edge will get thinner and thinner when
64traversing toward the bottom of the tree. Selection of :obj:`Parent
65node` makes the edge width correspond to proportion of instances in
66the nodes with respect to the instances in their parent node.
67
68Node Tab
69--------
70
71.. image:: images/ClassificationTreeGraph-NodeTab-S.png
72   :alt: Classification Tree Graph
73
74Parameters from the Node Tab govern the appearance of tree nodes
75and define what is displayed in the node box, of which the size can be
76set manually (:obj:`Node Width`). Tree nodes can display two lines of
77information selected by the user (:obj:`Show Info` box). In the
78snapshot the probability for the target class (republican) was
79reported in the first line in the node, and number of instances from
80the training set that reached this node in the second text
81line. Because of treatment of missing values, these numbers may not
82necessary be integers.
83
84The color of the node:
85
86   - may be uniform (:obj:`Node Color` set to :obj:`Default`),
87   - correspond to number of instances in the node with respect to the number
88     of instances in the root node (:obj:`Instances in node`),
89   - may report on the probability of the majority class
90     (:obj:`Majority class probability`) where one would expect that the color
91     intensity would be higher towards the leaves of the node,
92   - may report on probability of the target class (:obj:`Target class
93     probability`), with more intense colors marking the nodes where instances
94     of target class are more frequent, and
95   - may report on the distribution of instances with target class,
96     where the intensity of node color corresponds to proportion of the
97     target class instances in the node with respect to the target class
98     instances in the root node (:obj:`Target class distribution`).
99
100
101Navigation
102----------
103
104:obj:`Find Root` aligns the position of the window such that the
105root node is displayed in the center. If user selects the node
106(left-click on the node), :obj:`Find Selected` would bring the widow
107in position to display the selected node in the center. More advanced
108navigation is supported by a navigator window (click on the
109:obj:`Navigator` button), which displays a complete tree with a box
110signifying the currently viewed part of the tree in the main
111window. This box can be moved around thus exposing different parts of
112the tree in the main window. The tree visualization in the navigator
113corresponds to the visualization parameters set in the main
114window. Navigator also supports bubble info box which is displayed
115when mousing over the node in the tree.
116
117.. image:: images/ClassificationTreeGraph-Navigator-S.gif
118   :alt: Classification Tree Graph
119
120Examples
121--------
122
123Following is a simple schema where we have read the data,
124constructed the classification tree and viewed it in our tree
125viewer. Notice that if both the viewer and the widget that constructs
126the classification tree are open, any run of tree induction algorithm
127will have an immediate effect in the visualization. You can thus use
128this combination to explore how are the changes in induction algorithm
129reflected in the structure of the resulting tree.
130
131.. image:: images/ClassificationTreeGraph-SimpleSchema-S.gif
132   :alt: Classification Tree Graph
133
134Any click on the node of the tree would place the related data
135instances on the widget's output channel. This is explored in the
136schema below that shows this data in the data table and as a data
137subset in the scatterplot visualizer (for scatterplot to display the
138selected data properly, make sure that the tree data is passed as a
139data subset; this can simply be done by connecting scatterplot to the
140Data widget first, and connecting it to the tree visualization widget
141next).
142
143
144.. image:: images/ClassificationTreeGraph-Interaction.png
145   :alt: Classification Tree Graph - Interaction
Note: See TracBrowser for help on using the repository browser.