Chapter 5: Loss Functions Flashcards

1
Q

what is a loss function

A

describes how well a model fits training data

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

what are other names for loss function

A

error
cost
objective

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

what do we do with the loss function

A

aim to minimise or maximise it

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

give 5 loss functions

A

sum of squares error

mean squared error

hinge loss

cross entropy loss

likelihood, log likelihood

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

describe sum of squares error

A

1/2 (sum (Yi - yi)^2)

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

how do we calculate classification error

A

classes are calculated using thresholding

we use one hot encoding for multi class classification

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

what is regularisation

A

it prevents overfitting by drawing attention away from the error function

by adding a regularisation term to the error function

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

give a regularised least squares equation

A

normal squares + param/2 w^t w

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

give l1 regularisation

A

least squares + param/2 sum of dimensions |wj|^1

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

give l2 regularisation

A

least squares + param/2 sum of dimensions |wj|^2

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

what is another name for l2 regularisation

A

lasso

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

what is another name for l2 regularisation

A

ridge regression

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

give mean squared error

A

1/N (sum to N (Yi - yi)^2)

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

what is hinge loss

A

models the classification error

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

give hinge loss

A

sum to N( max(0, 1- Yi*yi))

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

give a regularised hinge loss

A

C sum to N( max(0, 1- Yi*yi)) + 1/2 wTw

17
Q

what is cross entropy loss

A

measures the distance between two probability distributions

18
Q

give cross entropy loss

A

H(p,q) = - sum of possible values P(x) log (q(x))

19
Q

give likelihood

A

likelihood(parameters | perceived data) = P(perceived data | parameters)

20
Q

what is log likelihood

A

exactly what it says

21
Q

what is MLE

A

maximum likelihood estimator

max(data | parameters)

22
Q

how do we calculate

likelihood(labels, data | parameters)

A

Number of training samples (label | output?)