Documente Academic
Documente Profesional
Documente Cultură
1 / 38
Supervised Learning. Evaluation
Evaluation Issues
2 / 38
Supervised Learning. Evaluation
Road Map
1 Evaluation Metrics
2 Evaluation Methods
3 How To Improve Classifiers Accuracy
3 / 38
Supervised Learning. Evaluation
Confusion Matrix
4 / 38
Supervised Learning. Evaluation
Confusion Matrix
Predicted Class
Yes No
Yes True positives False negatives
Target Class
No False positives True negatives
Remark
It gives insight not only into the errors being made by the classifier but
more importantly the types of errors being made.
5 / 38
Supervised Learning. Evaluation
Accuracy
Predicted Class
Yes No
Yes True positives (TP) False negatives (FN)
Target Class
No False positives (FP) True negatives (TN)
6 / 38
Supervised Learning. Evaluation
Accuracy
Accuracy is better measured using test data that was not used
to build the classifier
Referred to as the overall recognition rate of the classifier
Error rate or misclassification rate: 1 − Accuracy
7 / 38
Supervised Learning. Evaluation
8 / 38
Supervised Learning. Evaluation
Cost Matrix
Predicted Class
Yes No
Yes C(Yes|Yes) C(No|Yes)
Target Class
No C(Yes|No) C(No|No)
9 / 38
Supervised Learning. Evaluation
Predicted Class
Yes No
Costumer Yes 0 1
satisfied No 120 0
10 / 38
Supervised Learning. Evaluation
Cost-Sensitive Measures
Predicted Class
Yes No
Yes True positives (TP) False negatives (FN)
Target Class
No False positives (FP) True negatives (TN)
12 / 38
Supervised Learning. Evaluation
|yi − yi0 |
PN
Relative absolute error = Pi =1
N
i =1 |yi − ȳ|
(yi − yi0 )2
PN
Relative squared error = Pi =1
N 2
i =1 (yi − ȳ)
where N : size of the test dataset
14 / 38
Supervised Learning. Evaluation
Road Map
1 Evaluation Metrics
2 Evaluation Methods
3 How To Improve Classifiers Accuracy
15 / 38
Supervised Learning. Evaluation
16 / 38
Supervised Learning. Evaluation
17 / 38
Supervised Learning. Evaluation
18 / 38
Supervised Learning. Evaluation
Holdout
19 / 38
Supervised Learning. Evaluation
Random Subsampling
20 / 38
Supervised Learning. Evaluation
Cross Validation
Each subset in turn is used for testing and the remainder for
training:
First iteration. use D2 , · · · , Dk and training and D1 as test
Second iteration. use D1 , D3 , · · · , Dk as training and D2 as test
···
This is called k-fold cross validation
22 / 38
Supervised Learning. Evaluation
Cross Validation
23 / 38
Supervised Learning. Evaluation
24 / 38
Supervised Learning. Evaluation
25 / 38
Supervised Learning. Evaluation
26 / 38
Supervised Learning. Evaluation
27 / 38
Supervised Learning. Evaluation
The error on the train data gets less weight than the error on the test
data
Repeat process several times with different replacement samples;
average the results
28 / 38
Supervised Learning. Evaluation
More on Bootstrap
29 / 38
Supervised Learning. Evaluation
Road Map
1 Evaluation Metrics
2 Evaluation Methods
3 How To Improve Classifiers Accuracy
30 / 38
Supervised Learning. Evaluation
31 / 38
Supervised Learning. Evaluation
Bagging
Choose the diagnosis that occurs more than any of the others
32 / 38
Supervised Learning. Evaluation
Bagging
K iterations
At each iteration a training set Di is sampled with replacement
The combined model M ∗ returns the most frequent class in case
of classification, and the average value in case of prediction
33 / 38
Supervised Learning. Evaluation
Boosting
Intuition
34 / 38
Supervised Learning. Evaluation
Boosting
35 / 38
Supervised Learning. Evaluation
36 / 38
Supervised Learning. Evaluation
37 / 38
Supervised Learning. Evaluation
Summary
38 / 38