Part 2: Performance measures Flashcards

1
Q

Confusion matrix

A
Classification for 2 or more classes
- Data set for which class is known.
- Model assigns 0 or 1 to record.
- Example text classification/sentiment analysis
\+ spam vs not-spam
\+ positive, neutral, negative
- Some probabilities between 0 and 1 -> threshold
- Also more classes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

False positive (FP)

A

Selected documents that are not relevant.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

False negative (FN)

A

Not selected documents that are relevant.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Precision

A

The fraction of relevant and selected, compared to the selected. TP/(TP+FP)

  • When precision < 1, not all retrieved are relevant, FP > 0
  • When precision = 1, the FP = 0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Recall

A

The fraction of relevant and selected compared to the relevant. TP/(TP+FN)

  • Recall < 1, not all relevant are selected, FN > 0
  • Recall = 1, FN = 0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

F1 score

A

(2 * precision * recall) / (precision + recall)

Maximal when precision + recall = constant.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

ROC curve

A

Graph represents the cumulative classes (0, 1) of the example explained above. Every time you switch from direction (from vertical to horizontal or vice versa), you have an error.
Best curve is when you have 1 switch between horizontal and vertical (angle 90 degrees).

Probabilistic classifier:
- Assume the model calculates a number between 0 and 1.
- All records are listed in decreasing order.
- We choose a cut off value to decide on class.
This is also common in fraud analysis: the cut off is the suspicious one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Comparing classifiers

A
  • By using the probability we can order the records.
  • This produces a ROC curve.
  • Then choose the best cut-off value.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly