Cost Functions, Performance Measures and Optimization Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is the Cost Function?

A

The cost function is also called the loss function.

It is the difference between the predicted values and the ground truth, y.

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

What is the cost function used for regression?

A

We call it RMSE. Root-Mean-Square-Error

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

What is the cost function that we use to classify?

A

We have used a modified RMSE that is modified so that it returns either 0 or 1 by multiplying by the ground truth

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

What is regularization?

A

Regularization is something we use to prevent overfitting in our model.

We add some information to the cost function to change the algorithm

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

What is overfitting?

A

Overfitting is when the learning rate is too high so that the algorithm will over adjust when near the best fitting vector.

It could also describe when the model has been trained with too much training sets so that it learns the noise and errors of the data as features.

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

With classifiers, usually, how many nodes should there be in each layer as we go towards the output layer?

A

There should be fewer and fewer nodes.

e.g if there are 10 input nodes there should be fewer nods in layer 1 and so on.

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

Which parameters affect the learning

A

number of hidden layers, number of nodes in those layers, number of training iterations. Biasses

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

What is a hyperparameter?

A

A hyperparameter is the parameters that affect learning, but now how it learns. So.. learning rate and regularization parameters.

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

What are the performance measures for regression models?

A

RMSE or Mean Absolute error.

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

What is the performance measures for classification

A

Accuracy
F1 scores
Youden’s Index
precision

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

What is the accuracy performance measure for classification models?

A

It measures how accurate your model is at predicting and classifying correctly.

“The proportion of true results among the total number of cases”

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

What is the issue with accuracy performance measure?

A

It might not be useful.

If we predict how many asteroids we can just say zero and be right 99 % of the time. But the model is not very useful then.

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

which activation functions would you use for classification?

A

sigmoid or tanh

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

When is accuracy a good performance measure to use?

A

When we want to classify almost evenly distributed categories.

It does not make sense to use in very imbalanced cases.

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

What is the precision performance measure?

A

It is how often your model predicts truly correct.

How often your model predicts a case correctly

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

When do we use the precision performance measure?

A

When we want to be very precise with our predictions.
when it is important that the cases that are predicted are right. compared to when you just want to be statistically right

17
Q

What is the F1 performance measure?

A

The F1 measure is the harmonic mean.

It considers the precision, sensitivity and accuracy

18
Q

What is the accuracy and precision of the following classification, in the case 99 % of asteroids will miss the earth

Our model predicts that no asteroids will hit the earth

A

The accuracy is 99 %.

The precision is 0 - because there are no cases correctly predicted. e.g. measured a specific asteroid and then predicting that case.

We have not successfully predicted the true positives.

19
Q

If you are a police inspector and you want to catch criminals, you want to be sure that the person you catch is a criminal (Precision) and you also want to capture as many criminals (Recall) as possible. The F1 score manages this tradeoff.

A

okay thanks

20
Q

What is Youden’s Index?

A

It is a performance measure that takes into account specificity and sensitivity. It can yield 1 or 0.

1 when there is no false positives or false negatives. (perfect test)
0 when the test gives equal weight to positive and negative results (equal amount of wrong and right predictions.)