Classifiers Flashcards

(32 cards)

1
Q

What is the difference between classification and regression?

A

Classification aims to split discrete data into categories, whereas regression aims to model continuous data.

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

What type of learning is classification?

A

Supervised

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

What technique was used in the first classifiers?

A

Logistics Regression with x as continuous data and y as binary data

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

How do you fit a logistics regression using sklearn?

A

log_reg.fit(x_train, y_train)

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

How do you find the score of a logistics regression using sklearn?

A

log_reg.score(x_test, y_test)

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

How is score calculated for logistics regression?

A

mean accuracy on given test data and labels

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

What is a perceptron?

A

A perceptron is a function that aims to draw a line or plane to separate two categories of data.

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

What does a perceptron aim to learn?

A

It aims to learn the weights that allow it to best classify data. This is the same as learning the coefficient of the line.

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

How is a perceptron trained?

A

Weights initialised as 0
Cycle through the data
for each x tray classifying it: y = f(wx + b)
update w: w = w + α(y - y)x
If the prediction is correct w is not updated

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

What is a perceptrons main weakness?

A

They rely on data having linear separability. If a straight line can’t be drawn to separate the data, then a perceptron won’t work.

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

What is a Multi-Layer Perceptron?

A

The simplest type of Neural Network that contains hidden layers made up of a number of perceptrons.

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

What is the advantage of an MLP?

A

MLP’s don’t require the data to be linearly separable so are more powerful.

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

What technique is used to fit an ML model?

A

Gradient Descent

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

What are the two types of parameter fitting method?

A

Deterministic and Stochastic

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

How is error claculated?

A

Error is calculated using either L1 or L2 norm.

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

What is L1 Norm?

A

The sum of the absolute errors

17
Q

What is L2 Norm?

A

The root of the sum of squared errors

18
Q

What are other names for the error?

A

The cost function or loss function

19
Q

How does gradient descent work?

A

Start at random point p1
calculate loss at p1
take a step in the direction where the loss has the steepest gradient
calculate loss at new point
repeat until the loss gradient is less than a threshold or until N steps

20
Q

What is a confusion matrix?

A

A representation of the predicated values and if they are true/false positive or true/false negatives.

21
Q

How is precision calculated?

A

True Positive/ True Positive + False Positive

22
Q

How does high precision present?

A

an example labelled as positive is likely to be positive (small number of false positives)

23
Q

How is recall calculated?

24
Q

How does recall present?

A

a class is correctly recognised so there are a small number of false negatives

25
What does high recall but low precision mean?
Most of the positive samples are correctly recognised but there are lots of false positives
26
What does High precision and low recall mean?
It misses a lot of positive examples but those predicted as positive are indeed positive
27
How is an F1 score calculated?
F1 = 2 x (precision x recall)/(precision + recall)
28
What is a ROC Curve?
A graph that visualises the performance of a binary classifier as different classification thresholds
29
What is the ideal shape of a ROC curve?
Upper case Gamma (Γ)
30
How are different ROC curves compared?
By calculating and comapringg there area under curves (AUC)
31
What does the AUC measure?
The AUC measures the quality of a classifier's predictions over multiple thresholds and will work for any classifier.
32