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
Q

ML-02 - Logistic regression & classification

What’s the optimization algorithm BFGS short for?

A

Broyden, Fletcher, Goldfarb, and Shannon

26
Q

ML-02 - Logistic regression & classification

What’s the optimization algorithm CG short for?

A

Conjugate gradient

27
Q

ML-02 - Logistic regression & classification

What are the advantages of CG, BFGS and L-BFGS?

A
  • no need to manually pick learning rate (𝛼).
  • often faster (converging) than gradient descent.
28
Q

ML-02 - Logistic regression & classification

What are the disadvantages of CG, BFGS and L-BFGS?

A

They’re more complex than gradient descent.

29
Q

ML-02 - Logistic regression & classification

How does algorithm performance scale with data size?

A

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
Q

ML-02 - Logistic regression & classification

How do you deal with computational cost as dataset size grows? (2)

A
  • Use variants of gradient descent.
  • Map/reduce + parallelism
31
Q

ML-02 - Logistic regression & classification

How do you parallel process in machine learning?

A

Split training dataset into different pieces and compute them in parallel, and then combine

(See image)

32
Q

ML-02 - Logistic regression & classification

What are the names of the two big GPU platforms/programming models?

A
  • CUDA
  • OpenCL
33
Q

ML-02 - Logistic regression & classification

Who’s behind CUDA?

A

Nvidia

34
Q

ML-02 - Logistic regression & classification

Who’s behind OpenCL?

A

Apple and Khronos Group

35
Q

ML-02 - Logistic regression & classification

What’s Nvidia’s GPU computing platform/programming model called?

A

CUDA

36
Q

ML-02 - Logistic regression & classification

What’s Apple + Khronos Group’s GPU computing platform/programming model called?

A

OpenCL

37
Q

ML-02 - Logistic regression & classification

How do you handle multiclass problems?

A

Use “1 vs. rest”?

38
Q

ML-02 - Logistic regression & classification

What is “1 vs. rest”?

A
  • Treat multiclass classification as multiple binary class problems.
  • Train 1 classifier for each problem.

(See image)

39
Q

ML-02 - Logistic regression & classification

What do you call the depicted type of classifier?

(See image)

A

1 vs. rest (for multiclass classification)