Skip to content

Commit bfb01cc

Browse files
authored
Merge pull request #10 from ajdapretnar/docs-eval
Evaluate: Updated documentation
2 parents 756f807 + 1cc49cc commit bfb01cc

35 files changed

+533
-55
lines changed

source/widgets/evaluate/confusionmatrix.md

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,38 @@ Shows proportions between the predicted and actual class.
1212
- Selected Data: data subset selected from confusion matrix
1313
- Data: data with the additional information on whether a data instance was selected
1414

15-
The [Confusion Matrix](https://en.wikipedia.org/wiki/Confusion_matrix) gives the number/proportion of instances between the predicted and actual class. The selection of the elements in the matrix feeds the corresponding instances into the output signal. This way, one can observe which specific instances were misclassified and how.
15+
The [Confusion Matrix](https://en.wikipedia.org/wiki/Confusion_matrix) gives the number/proportion of instances between the predicted and actual class. Each row corresponds to a correct class, while columns represent the predicted classes. The rightmost column gives the number of instances from each class and the bottom row gives the number of instances classified into each class.
1616

17-
The widget usually gets the evaluation results from [Test & Score](../evaluate/testandscore.md); an example of the schema is shown below.
17+
The selection of the elements in the matrix feeds the corresponding instances into the output signal. This way, one can observe which specific instances were misclassified and how.
18+
19+
The widget usually gets the evaluation results from [Test and Score](../evaluate/testandscore.md); an example of the schema is shown below.
1820

1921
![](images/ConfusionMatrix-stamped.png)
2022

21-
1. When evaluation results contain data on multiple learning algorithms, we have to choose one in the *Learners* box.
22-
The snapshot shows the confusion matrix for [Tree](../model/tree.md) and [Naive Bayesian](../model/naivebayes.md) models trained and tested on the *iris* data. The right-hand side of the widget contains the matrix for the naive Bayesian model (since this model is selected on the left). Each row corresponds to a correct class, while columns represent the predicted classes. For instance, four instances of *Iris-versicolor* were misclassified as *Iris-virginica*. The rightmost column gives the number of instances from each class (there are 50 irises of each of the three classes) and the bottom row gives the number of instances classified into each class (e.g., 48 instances were classified into virginica).
23-
2. In *Show*, we select what data we would like to see in the matrix.
23+
1. *Learners*: Choose a learning algorithm to display.
24+
2. *Output*: define what is sent to the output, namely predicted classes (*Predictions*) or their probabilities (*Probabilities*).
25+
3. The widget outputs every change if *Send Automatically* is ticked. If not, the user will need to click *Send Selected* to commit the changes.
26+
4. *Show*: select what data to see in the matrix.
2427
- **Number of instances** shows correctly and incorrectly classified instances numerically.
25-
- **Proportions of predicted** shows how many instances classified as, say, *Iris-versicolor* are in which true class; in the table we can read the 0% of them are actually setosae, 88.5% of those classified as versicolor are versicolors, and 7.7% are virginicae.
26-
- **Proportions of actual** shows the opposite relation: of all true versicolors, 92% were classified as versicolors and 8% as virginicae.
27-
![](images/ConfusionMatrix-propTrue.png)
28-
3. In *Select*, you can choose the desired output.
29-
- **Correct** sends all correctly classified instances to the output by selecting the diagonal of the matrix.
30-
- **Misclassified** selects the misclassified instances.
31-
- **None** annuls the selection.
32-
As mentioned before, one can also select individual cells of the table to select specific kinds of misclassified instances (e.g. the versicolors classified as virginicae).
33-
4. When sending selected instances, the widget can add new attributes, such as predicted classes or their probabilities, if the corresponding options *Predictions* and/or *Probabilities* are checked.
34-
5. The widget outputs every change if *Send Automatically* is ticked. If not, the user will need to click *Send Selected* to commit the changes.
35-
6. Produce a report.
28+
- **Proportions of predicted** shows how many instances classified as, say, *Iris-versicolor* are in which true class; in the table we can read the 0% of them are actually setosae, 95.9% of those classified as versicolor are versicolors, and 4.1% are virginicae.
29+
![](images/ConfusionMatrix-propPred.png)
30+
- **Proportions of actual** shows the opposite relation: of all true versicolors, 94% were classified as versicolors and 6% as virginicae.
31+
![](images/ConfusionMatrix-propAct.png)
32+
- **Sum of probabilities** sums the probabilities for each class. For example, there are 50 iris-setosas. This option sums probabilities for all *actual* versicolors to belong to iris-setosa (1.4), to iris-versicolor (41.4), and to iris-virginica (7.2).
33+
![](images/ConfusionMatrix-sumProb.png)
34+
5. Select the desired output:
35+
- **Select Correct** sends all correctly classified instances to the output by selecting the diagonal of the matrix.
36+
- **Select Misclassified** selects the misclassified instances.
37+
- **Clear Selection** annuls the selection.
38+
As mentioned before, one can also select individual cells of the table to select specific kinds of misclassified instances.
3639

3740
Example
3841
-------
3942

40-
The following workflow demonstrates what this widget can be used for.
41-
42-
![](images/ConfusionMatrix-Schema.png)
43-
44-
[Test & Score](../evaluate/testandscore.md) gets the data from [File](../data/file.md) and two learning algorithms from [Naive Bayes](../model/naivebayes.md) and [Tree](../model/tree.md). It performs cross-validation or some other train-and-test procedures to get class predictions by both algorithms for all (or some) data instances. The test results are fed into the **Confusion Matrix**, where we can observe how many instances were misclassified and in which way.
43+
The following workflow demonstrates what this widget can be used for. We are using the *iris* dataset for demonstration.
4544

46-
In the output, we used [Data Table](../data/datatable.md) to show the instances we selected in the confusion matrix. If we, for instance, click *Misclassified*, the table will contain all instances which were misclassified by the selected method.
45+
![](images/ConfusionMatrix-Example.png)
4746

48-
The [Scatter Plot](../visualize/scatterplot.md) gets two sets of data. From the [File](../data/file.md) widget it gets the complete data, while the confusion matrix sends only the selected data, misclassifications for instance. The scatter plot will show all the data, with bold symbols representing the selected data.
47+
[Test and Score](../evaluate/testandscore.md) gets the data from [File](../data/file.md) and a learning algorithm, [Naive Bayes](../model/naivebayes.md). It performs cross-validation or some other train-and-test procedures to get class predictions for all (or some) data instances. The test results are fed into the **Confusion Matrix**, where we can observe how many instances were misclassified and in which way.
4948

50-
![](images/ConfusionMatrix-Example.png)
49+
In the output, we used [Scatter Plot](../visualize/scatterplot.md), which gets two sets of data, the whole dataset from the File widget, and a subset from Confusion Matrix. Now, we wish to show where the misclassifications lie in the Scatter Plot. We click *Misclassified*, which selects all the off-diagonal (misclassified) instances from the confusion matrix. The scatter plot will show all the data in a graph, with bold symbols representing the selected (misclassified) data points.
-13.3 KB
Binary file not shown.
-5.88 KB
Binary file not shown.
-13.3 KB
Binary file not shown.
-13.3 KB
Binary file not shown.
-12.9 KB
Binary file not shown.
-1.86 KB
Binary file not shown.
258 KB
Loading
52.7 KB
Loading
51.8 KB
Loading

0 commit comments

Comments
 (0)