source: orange/Orange/doc/widgets/Evaluate/Predictions.htm @ 9671:a7b056375472

Revision 9671:a7b056375472, 6.0 KB checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1<html>
2<head>
3<title>Predictions</title>
4<link rel=stylesheet href="../../../style.css" type="text/css" media=screen>
5<link rel=stylesheet href="style-print.css" type="text/css" media=print></link>
6</head>
7
8<body>
9
10<h1>Predictions</h1>
11
12<img class="screenshot" src="../icons/Predictions.png">
13<p>Shows the model's prediction on data.</p>
14
15<h2>Channels</h2>
16
17<h3>Inputs</h3>
18
19<DL class=attributes>
20<DT>Data (ExampleTable)</DT>
21<DD>Data to be classified</DD>
22
23<DT>Predictors (orange.Classifier)</DT>
24<DD>Predictors to be used on the data; multiple widget can connect to this slot</DD>
25</dl>
26
27<h3>Outputs</h3>
28
29<DL class=attributes>
30<DT>Predictions (orange.ExampleTable)</DT>
31<DD>Original example table with added predictions</DD>
32</dl>
33
34<h2>Description</h2>
35
36<p>The widget gets a data set and one or more predictors (classifiers, not learning algorithms - see the example below). It shows a table with the data and the predictions made.</p>
37
38<p>Despite its simplicity, the widget allows for quite interesting analysis of decisions of predictive models; there is a simple demonstration at the end of the page. Note also, however, the related widget <a href="ConfusionMatrix.htm">Confusion Matrix</a>. Although many things can be done with any of them, there are tasks for which one of them might be much more convenient than the other.</p>
39
40<img class="screenshot" src="Predictions.png"/>
41
42<p>The widget can show class predictions (<span class="option">Show predicted class</span>) and predicted probabilities for the selected classes (<span class="option">Show predicted probabilities</span>, the classes are selected below).</p>
43
44<p>By default, the widget also shows the attributes. This can be disabled by checking <span class="option">Hide all</span> under <span class="option">Data Attributes</span>.</p>
45
46<p>The output of the widget is another data table, where predictions are appended as new meta attributes. The table is output either automatically (<span class="option">Send automatically</span>) or upon clicking <span class="option">Send Predictions</span>.</p>
47
48
49<h2>Example</h2>
50
51<p>Here is a demonstration.</p>
52
53<img class="schema" src="Predictions-Schema.png"/>
54
55<p>First, compare the schema with the one for <a href="TestLearners.htm">Test Learners</a>. Widgets representing learning algorithms, like <a href="../Classify/NaiveBayes.htm">Naive Bayesian classifier</a> or <a href="ClassificationTree.htm">Classification tree</a> provide two kinds of signals, one with a learning algorithm and one with a classifier, that is, a result of the learning algorithm when it is given some data. The learner is available always, while for outputting a classifier, the widget representing a learning algorithm needs to be given some data.</p>
56
57<p>Test Learners tests learning algorithms, hence it expects learning algorithms on the input. In the corresponding schema, we gave the Test Learners some data from the File widget and a few "learner widgets". Widget Predictions shows predictions of a classifier, hence it needs a classifier and data. To get a classifier from the learner widget, the widget needs to be given data.</p>
58
59<p>This is hence what we do: we randomly split the data into two subsets. The larger, containing 70 % of data instances, is given to Naive Bayes and Classification tree, so they can produce the corresponding classifiers. The classifiers go into Predictions, among with the remaining 30 % of the data. Predictions shows how these examples are classified.</p>
60
61<p>The results of this procedure on the heart disease data are shown in the snapshot at beginning of the page. The last three columns are the actual class, and the predictions by the classification tree and naive Bayesian classifier. For the latter two we see the probability of class "1" (since this is the class chosen on the left-hand side of the widget) and the predicted class.</p>
62
63<p>The schema also shows a few things we can do with the data from the widget. First, we can observe it in a <a href="../Data/DataTable.htm">Data Table</a>. It shows a similar view to the one in Predictions, except that the probabilities are shown as separate attributes, so we can sort the examples by them and so on.</p>
64
65<p>To save the predictions, we simply attach the <a href="../Data/Save.htm">Save</a> widget to Predictions.</p>
66
67<p>Finally, we can analyze the classifier's predictions. For instance, we want to observe the relations between probabilities predicted by the two classifiers with respect to the class. For that, we first take <a href="../Data/SelectAttributes.htm">Select Attributes</a> with which we move the meta attributes with probability predictions to ordinary attributes. The transformed data is then given to the <a href="../Visualize/ScatterPlot.htm">Scatter plot</a>, which we set to use the attributes with probabilities for the x and y axes, and the class is (as already by default) used to color the data points.</p>
68
69<img src="Predictions-ExampleScatterplot.png" />
70
71<p>To get the above plot, we added 5% jittering to continuous attributes, since the classification tree gives just a few distinct probabilities, hence without jittering there would be too much overlap between the points.</p>
72
73<p>The blue points at the bottom left represent the people with no diameter narrowing, which were correctly classified by both classifiers. The upper left red points represent the patients with narrowed vessels, which were correctly classified by both. At the top left there are a few blue points: these are those without narrowed vessels to whom the tree gave a high probability of having the disease, while Bayesian classifier was right by predicting a low probability of the disease. In the opposite corner, we can spot red points, that is, the sick, to which the tree gave a low probability, while the naive Bayesian classifier was (again) right by assigning a high probability of having the disease.</p>
74
75<p>Note that this analysis is done on a rather small sample, so these conclusions may be ungrounded.</p>
76
77
78
79
80
81<p>Another example of using this widget is given in the documentation for widget <a href="ConfusionMatrix.htm">Confusion Matrix</a>.</p>
82
83</body>
84</html>
Note: See TracBrowser for help on using the repository browser.