ML-05 - Model evaluation Flashcards

1
Q

ML-05 - Model evaluation

Describe the typical ML workflow. (7)

A

(See image)

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

ML-05 - Model evaluation

Describe k-fold cross-validation.

A

(See image)

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

ML-05 - Model evaluation

Describe the validation workflow.

A

(See image)

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

ML-05 - Model evaluation

Describe the test workflow.

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

ML-05 - Model evaluation

What is a requirement for using accuracy as a metric?

A

Your data has to be balanced.

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

ML-05 - Model evaluation

What should you use in place of accuracy, if your data is imbalanced?

A

Precision, recall, F1 or ROC-AUC.

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

ML-05 - Model evaluation

What is the formula for precision?

A

TP/PP = TP / (TP + FP) = True positives / predicted positives.

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

ML-05 - Model evaluation

What is the formula for recall?

A

TP/P = TP/(TP + FN) = True positives / actual positives

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

ML-05 - Model evaluation

Fill in the labels “Predicted” and “Actual”. (See image)

A

(See image)

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

ML-05 - Model evaluation

Which one is used to calculate precision? (See image)

A

2

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

ML-05 - Model evaluation

Which one is used to calculate recall? (See image)

A

1

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

ML-05 - Model evaluation

What’s the formula for F1 score?

A

(See image)

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

ML-05 - Model evaluation

What are some benefits of the F1 score? (2)

A
  • 1 metric over 2 (P&R) makes it easier to make decisions.
  • Automatically selects threshold values.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

ML-05 - Model evaluation

What is a drawback of the F1 score?

A

Difficult to interpret.

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

ML-05 - Model evaluation

How can you visualize precision/recall? (3 mentioned)

A
  • Confusion matrix
  • ROC curve (from slides; technically TPR/FPR?)
  • Precision/recall curve
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

ML-05 - Model evaluation

What is ROC short for?

A

Receiver operating characteristic

17
Q

ML-05 - Model evaluation

What us AUC short for?

A

Area under curve

18
Q

ML-05 - Model evaluation

What is a ROC curve?

A

A plot of TPR vs. FPR.

19
Q

ML-05 - Model evaluation

What is ROC-AUC?

A

The area under a ROC curve.

20
Q

ML-05 - Model evaluation

What is TPR short for?

A

True positive rate

21
Q

ML-05 - Model evaluation

What is FPR short for?

A

False positive rate

22
Q

ML-05 - Model evaluation

How do you interpret the values in ROC-AUC, e.g. 0.9?

A

AUC = 0.9 means there is a 90% chance the model can distinguish between +/- classes.

23
Q

ML-05 - Model evaluation

What is PR-AUC short for?

A

Precision-recall curve area under curve.

24
Q

ML-05 - Model evaluation

What is a PR curve?

A

Precision recall curve.

25
Q

ML-05 - Model evaluation

How do you plot a PR curve?

A

A precision-recall plot has P/R as the axes.

It is plotted by changing the threshold value for e.g. a sigmoid output activation, then plotting the corresponding precision/recall values

26
Q

ML-05 - Model evaluation

How do you tune precision/recall to avoid false positives?

A

Tune for high precision, low recall.

27
Q

ML-05 - Model evaluation

How do you tune precision/recall to avoid false negatives?

A

Tune for low precision, high recall.