L8 - Gradient Descent and Classifier Performance Flashcards
1
Q
- What is fitting a model?
A
- The process of finding parameters such that the model fits to to the data.
2
Q
- In classification, what are 2 sub-optimal approaches to fitting a model?
A
- Random Sampling Values
- Grid Search
3
Q
- Through what process can we improve parameter fitting?
A
- Learning
- Minimise error and maximise fit
4
Q
- When parameter fitting, what is the goal?
A
- To minimise error of the model
- I.e find the minimum error point
5
Q
- When establishing the minimum error using a Generic Parameter Fitting model, when do we stop?
A
- When the error starts increasing again.
6
Q
- In Deterministic Parameter Fitting, when do we stop?
A
- When we reach N steps since everything is determined.
7
Q
- Describe the Stochastic Parameter Fitting method…
A
- Pick a random point P1 and calculate L2 norm
- Pick a random point P2 near P1 and calculate L2 norm
- Repeat until L2 norm is less than an error threshold or whether N steps can been taken.
8
Q
- What is the purpose of the gradient descent algorithm?
A
- Iteratively find the minimum of a function or model.
- In this context, to find the minimum error of the classification model.
9
Q
- When does the gradient descent algorithm stop?
A
- When the error is 0
10
Q
- Describe the steps of the gradient descent algorithm
A
- Start at random point P1
- Calculate loss of P1
- Choose P2 in the direction where the loss has the steepest gradient
- Repeat until loss value is below a threshold or N steps have been taken
11
Q
- Why do we want to minimise the loss function of a model?
A
- In order for the model to better fit the data
12
Q
- What is Precision? And what does it mean if a model has High Precision?
A
- Positive Prediction Value -> I.e Those labeled as positive is indeed positive
- Confusion matrix shows few number of False Positives
13
Q
- What is Recall? And what does it mean if a model has High Recall?
A
- Recall is sensitivity -> Out of all the actual positive instances, how many did the model correctly identify?
- Measures how well the model avoids FN’s.
- Model is good at finding positive instances, but may not be precise.
14
Q
- What are the equations for Precision and Recall?
A
- Precision = TP / ( TP + FP )
- Recall = TP / ( TP + FN )
15
Q
- What does it mean if a model has High Recall and Low Precision?
A
- Most positive instances are classified, but there’s likely to be many false positives.
16
Q
- What does it mean if a model has Low Recall and High Precision?
A
- Misses a lot of positive instances, but the TP’s predicted are likely correct.
17
Q
- What is the F1 measure?
A
- Score that combines the Precision and Recall measures.
18
Q
- In a classification model, what is the difference between Specificity and Sensitivity?
A
- Sensitivity -> Measures the models ability to identify positive instances, but may not be precise.
- Specificity -> Measures TN accuracy.
19
Q
- What does the ROC curve show?
A
- Combines specificity and sensitivity to show the trade off between TP and FP rate
20
Q
- What is the threshold of the ROC curve? How do we decide it?
A
- Threshold is hyper parameter that is set to create new TP and FP values.
- Threshold is a design choice -> Asks the question, which mistake is worse, a false positive or a false negative?
21
Q
- Regarding TP and FP, what is the perfect classifier?
A
- High TP and Low FP
22
Q
- What is the ideal value of Area Under Curve?
A
- Close to 1 as possible -> Higher TP rate
23
Q
- How is a ROC curve created?
A
- Iteratively move threshold across the classification graph, calculating the sensitivity and specificity at each point.
- Plot the results on a scatter graph.
- The result is the ROC curve
24
Q
- What is the main metric that can be calculated from the ROC curve?
A
- Area under curve -> Tells us ability to calculate True Positives.