ML-02 - Logistic regression & classification Flashcards

1
Q

ML-02 - Logistic regression & classification

Describe what a classification problem is.

A

A classification problem is when the output (𝑦) is discrete or categorical, e.g., email classified as spam, not spam.

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

ML-02 - Logistic regression & classification

What are the two types of classification problems?

A
  • Binary, 2 classes (Dog or not dog; cat or dog)
  • Multiclass (Dog, cat, giraffe or zebra)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ML-02 - Logistic regression & classification

Why do we use logistic regression over linear regression for classification problems?

A

Logistic regression handles discrete output for classification, unlike linear regression’s continuous values.

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

ML-02 - Logistic regression & classification

What’s the most common logistic function?

A

The sigmoid function (See image).

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

ML-02 - Logistic regression & classification

What’s the name of the pictures function? (See image)

A

The sigmoid function.

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

ML-02 - Logistic regression & classification

How do we apply logistic regression?

A

(See image)

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

ML-02 - Logistic regression & classification

How do we interpret the outputs of a logistic regression model?

A

Estimated probability of the positive case being true.

E.g. P(y = 1 | x ; w)

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

ML-02 - Logistic regression & classification

What is another name for the outputs of a logistic function?

A

Logits.

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

ML-02 - Logistic regression & classification

What is a logit?

A

The output values of a logistic function are often called logits.

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

ML-02 - Logistic regression & classification

What is a linear decision boundary?

A

A line that separates one class of data from another class.

(See image)

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

ML-02 - Logistic regression & classification

What is a non-linear decision boundary?

A

An equation that separates different classes of data.

(See image)

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

ML-02 - Logistic regression & classification

What is an advantage to using non-linear decision boundaries?

A

They can represent more complex decision boundaries.

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

ML-02 - Logistic regression & classification

How do you write a decision boundary in matrix form?

A

(See image)

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

ML-02 - Logistic regression & classification

What is the loss function used for logistic regression?

A

Cross-entropy loss

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

ML-02 - Logistic regression & classification

What’s another name for cross-entropy loss?

A

Log loss

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

ML-02 - Logistic regression & classification

What’s another name for log loss?

A

Cross-entropy loss

17
Q

ML-02 - Logistic regression & classification

What’s the formula for cross-entropy loss?

A

(See image)

18
Q

ML-02 - Logistic regression & classification

What loss fomula is depicted? (See image)

A

Cross-entropy loss

19
Q

ML-02 - Logistic regression & classification

What loss function would you use for a binary class problem, when using logistic regression?

A

Binary cross-entropy loss

20
Q

ML-02 - Logistic regression & classification

What is the formula for binary cross-entropy loss?

A

(See image)

21
Q

ML-02 - Logistic regression & classification

What loss function is this? (See image)

A

Binary cross-entropy loss

22
Q

ML-02 - Logistic regression & classification

What’s the full formula for binary cross-entropy loss?

A

(See image)

23
Q

ML-02 - Logistic regression & classification

What are 3 more advanced optimization algorithms mentioned in this chapter?

A
  • CG
  • BFGS
  • L-BGFS
24
Q

ML-02 - Logistic regression & classification

What’s the optimization algorithm CG short for?

A

Conjugate gradient

25
# ML-02 - Logistic regression & classification What's the optimization algorithm BFGS short for?
Broyden, Fletcher, Goldfarb, and Shannon
26
# ML-02 - Logistic regression & classification What's the optimization algorithm CG short for?
Conjugate gradient
27
# ML-02 - Logistic regression & classification What are the advantages of CG, BFGS and L-BFGS?
- no need to manually pick learning rate (𝛼). - often faster (converging) than gradient descent.
28
# ML-02 - Logistic regression & classification What are the disadvantages of CG, BFGS and L-BFGS?
They're more complex than gradient descent.
29
# ML-02 - Logistic regression & classification How does algorithm performance scale with data size?
Algorithms performance similar when dataset is large. It’s not who has the best algorithm that wins, it’s who has the most/best data.
30
# ML-02 - Logistic regression & classification How do you deal with computational cost as dataset size grows? (2)
- Use variants of gradient descent. - Map/reduce + parallelism
31
# ML-02 - Logistic regression & classification How do you parallel process in machine learning?
Split training dataset into different pieces and compute them in parallel, and then combine (See image)
32
# ML-02 - Logistic regression & classification What are the names of the two big GPU platforms/programming models?
- CUDA - OpenCL
33
# ML-02 - Logistic regression & classification Who's behind CUDA?
Nvidia
34
# ML-02 - Logistic regression & classification Who's behind OpenCL?
Apple and Khronos Group
35
# ML-02 - Logistic regression & classification What's Nvidia's GPU computing platform/programming model called?
CUDA
36
# ML-02 - Logistic regression & classification What's Apple + Khronos Group's GPU computing platform/programming model called?
OpenCL
37
# ML-02 - Logistic regression & classification How do you handle multiclass problems?
Use "1 vs. rest"?
38
# ML-02 - Logistic regression & classification What is "1 vs. rest"?
- Treat multiclass classification as multiple binary class problems. - Train 1 classifier for each problem. (See image)
39
# ML-02 - Logistic regression & classification What do you call the depicted type of classifier? (See image)
1 vs. rest (for multiclass classification)