C4 Flashcards
accuracy is not a good measure in most cases of classification
classes are often unbalanced: high accuracy in one class might mean low accuracy in another class --> use precision and recall
precision
what proportion of the assigned labels are correct? (for one class)
Precision = |A * T| / |A| = tp / (tp + fp)
recall
what proportion of true labels was assigned?
Recall = |A * T| / |T| = tp / (tp + fn)
F-score
average of precision and recall
F1 = 2 * precision * recall / (precision + recall)
what determines the quality of the classifier
- difficulty of the task: more categories = more difficult
- number of training items: more is better
- richness of the representation: more informative features are better
analysis for classification
per-item evaluation: which are the most difficult items, one classifier may work better for one subset, another for another subset
per-category evaluation: what is the precision and recall per class (especially with class imbalance)
error analysis: confusion matrix
evaluation for regression
mean squared error:
- difference between y_hat en y = error
- square each error (bigger error more punished)
- take the mean
evaluation for rankings
option 1: proportion of correct answers at position 1
option 2: proportion of items that have the correct answer in the top n
option 3: the rank of the correct answer or the rank of the highest ranked relevant answer (multiple answers)