source: orange/docs/widgets/rst/classify/classificationtreegraph.rst @ 11050:e3c4699ca155

Revision 11050:e3c4699ca155, 5.7 KB checked in by Miha Stajdohar <miha.stajdohar@…>, 16 months ago (diff)

Widget docs From HTML to Sphinx.

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