Module 3 Flashcards

1
Q

Hyperparameter

A

Model parameters that are chosen before the training

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

Hyperparameter tuning

A
  • split dataset into training/validation/test
  • split between 60/20/20 and 80/10/10
  • try different hyperparameters
  • select best according to the validation dataset accuracy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Cross-validation

A
  • divide dataset into k equal folds
  • k-1 folds for training+validation
  • 1 for testing
  • iterate k times
  • testing on a different portion of the data
  • performance on all k held-out test sets can be averaged
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Cross-validation parameter tuning

A

Each iteration:

  • 1 fold for testing
  • 1 fold for validation
  • k-2 folds for training
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Cross-validation in production

A
  • can use all the available data for training the model ✅

- don’t have a way of estimating the performance of the final trained model any more ❌

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

Confusion matrix: accuracy

A

TP + TN / (TP + TN + FP + FN)

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

Confusion matrix: precision

A

TP / (TP + FP)

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

Recall

A

TP + / (TP + FN)

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

Macro-averaged recall

A

Average of recall for each class

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

F-measure

A

F1 = 2 . precision . recall / (precision + recall)

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

Micro-averaging

A

Calculate the average of each metric (e.g. TP, FP, TN, FN)

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

Mean squares error

A

1/N Σ (yi - ŷi)**2

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

Imbalanced test set: solutions

A
  • downsample the majority class

- up sample the minority class

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

Overfitting

A
  • good performance on training data

- poor generalisation on other data

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

Underfitting

A
  • poor performance on training data

- poor generalisation to other data

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

Reasons for overfitting

A
  • model is too complex
  • examples in training set don’t represent all possible situations
  • learning is performed for too long
17
Q

To prevent overfitting

A
  • right level of complexity
  • getting more data
  • stopping training earlier
18
Q

Gradient descent

A

Repeatedly update parameters a and b by taking small steps in the negative direction of the partial derivative